diff options
| author | Joakim Verona | 2015-01-11 18:40:21 +0100 |
|---|---|---|
| committer | Joakim Verona | 2015-01-11 18:40:21 +0100 |
| commit | cc7cb20d6abc0f862e5513b24831bba0eaecaa5f (patch) | |
| tree | afc2fc05401504aa0c28699dc3bc155c5b0d7f58 /src | |
| parent | d972b504f30ff4300ba368940751e8736dddf0b4 (diff) | |
| parent | 9a57bda31569294ecaf8138a06e5edda9c0d87e3 (diff) | |
| download | emacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.tar.gz emacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.zip | |
merge master, fix conflicts
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 18 | ||||
| -rw-r--r-- | src/ChangeLog | 247 | ||||
| -rw-r--r-- | src/alloc.c | 147 | ||||
| -rw-r--r-- | src/bidi.c | 1 | ||||
| -rw-r--r-- | src/buffer.c | 41 | ||||
| -rw-r--r-- | src/buffer.h | 6 | ||||
| -rw-r--r-- | src/bytecode.c | 1 | ||||
| -rw-r--r-- | src/callint.c | 14 | ||||
| -rw-r--r-- | src/casefiddle.c | 2 | ||||
| -rw-r--r-- | src/casetab.c | 1 | ||||
| -rw-r--r-- | src/category.c | 2 | ||||
| -rw-r--r-- | src/ccl.c | 24 | ||||
| -rw-r--r-- | src/ccl.h | 2 | ||||
| -rw-r--r-- | src/character.c | 6 | ||||
| -rw-r--r-- | src/character.h | 1 | ||||
| -rw-r--r-- | src/charset.c | 20 | ||||
| -rw-r--r-- | src/charset.h | 3 | ||||
| -rw-r--r-- | src/chartab.c | 4 | ||||
| -rw-r--r-- | src/cmds.c | 13 | ||||
| -rw-r--r-- | src/coding.c | 51 | ||||
| -rw-r--r-- | src/coding.h | 19 | ||||
| -rw-r--r-- | src/composite.c | 4 | ||||
| -rw-r--r-- | src/composite.h | 1 | ||||
| -rw-r--r-- | src/conf_post.h | 4 | ||||
| -rw-r--r-- | src/data.c | 56 | ||||
| -rw-r--r-- | src/dbusbind.c | 39 | ||||
| -rw-r--r-- | src/decompress.c | 2 | ||||
| -rw-r--r-- | src/dired.c | 8 | ||||
| -rw-r--r-- | src/dispextern.h | 28 | ||||
| -rw-r--r-- | src/dispnew.c | 12 | ||||
| -rw-r--r-- | src/disptab.h | 3 | ||||
| -rw-r--r-- | src/doc.c | 2 | ||||
| -rw-r--r-- | src/dosfns.c | 2 | ||||
| -rw-r--r-- | src/editfns.c | 24 | ||||
| -rw-r--r-- | src/emacs.c | 9 | ||||
| -rw-r--r-- | src/eval.c | 38 | ||||
| -rw-r--r-- | src/fileio.c | 99 | ||||
| -rw-r--r-- | src/fns.c | 22 | ||||
| -rw-r--r-- | src/font.c | 70 | ||||
| -rw-r--r-- | src/font.h | 18 | ||||
| -rw-r--r-- | src/fontset.c | 5 | ||||
| -rw-r--r-- | src/fontset.h | 1 | ||||
| -rw-r--r-- | src/frame.c | 192 | ||||
| -rw-r--r-- | src/frame.h | 51 | ||||
| -rw-r--r-- | src/fringe.c | 4 | ||||
| -rw-r--r-- | src/ftfont.c | 9 | ||||
| -rw-r--r-- | src/ftxfont.c | 2 | ||||
| -rw-r--r-- | src/gfilenotify.c | 56 | ||||
| -rw-r--r-- | src/gnutls.c | 23 | ||||
| -rw-r--r-- | src/image.c | 109 | ||||
| -rw-r--r-- | src/inotify.c | 81 | ||||
| -rw-r--r-- | src/insdel.c | 6 | ||||
| -rw-r--r-- | src/intervals.h | 16 | ||||
| -rw-r--r-- | src/keyboard.c | 257 | ||||
| -rw-r--r-- | src/keyboard.h | 31 | ||||
| -rw-r--r-- | src/keymap.c | 19 | ||||
| -rw-r--r-- | src/keymap.h | 3 | ||||
| -rw-r--r-- | src/lisp.h | 434 | ||||
| -rw-r--r-- | src/lread.c | 101 | ||||
| -rw-r--r-- | src/macfont.m | 24 | ||||
| -rw-r--r-- | src/macros.c | 5 | ||||
| -rw-r--r-- | src/menu.h | 4 | ||||
| -rw-r--r-- | src/minibuf.c | 36 | ||||
| -rw-r--r-- | src/nsfns.m | 29 | ||||
| -rw-r--r-- | src/nsfont.m | 7 | ||||
| -rw-r--r-- | src/nsimage.m | 2 | ||||
| -rw-r--r-- | src/nsmenu.m | 6 | ||||
| -rw-r--r-- | src/nsselect.m | 2 | ||||
| -rw-r--r-- | src/nsterm.h | 1 | ||||
| -rw-r--r-- | src/nsterm.m | 17 | ||||
| -rw-r--r-- | src/print.c | 12 | ||||
| -rw-r--r-- | src/process.c | 32 | ||||
| -rw-r--r-- | src/process.h | 9 | ||||
| -rw-r--r-- | src/profiler.c | 1 | ||||
| -rw-r--r-- | src/search.c | 9 | ||||
| -rw-r--r-- | src/sound.c | 6 | ||||
| -rw-r--r-- | src/syntax.c | 8 | ||||
| -rw-r--r-- | src/term.c | 9 | ||||
| -rw-r--r-- | src/terminal.c | 4 | ||||
| -rw-r--r-- | src/textprop.c | 22 | ||||
| -rw-r--r-- | src/undo.c | 8 | ||||
| -rw-r--r-- | src/w32.c | 2 | ||||
| -rw-r--r-- | src/w32.h | 1 | ||||
| -rw-r--r-- | src/w32fns.c | 21 | ||||
| -rw-r--r-- | src/w32font.c | 47 | ||||
| -rw-r--r-- | src/w32inevt.c | 3 | ||||
| -rw-r--r-- | src/w32menu.c | 2 | ||||
| -rw-r--r-- | src/w32notify.c | 10 | ||||
| -rw-r--r-- | src/w32proc.c | 2 | ||||
| -rw-r--r-- | src/w32select.c | 8 | ||||
| -rw-r--r-- | src/w32term.c | 9 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 4 | ||||
| -rw-r--r-- | src/window.c | 27 | ||||
| -rw-r--r-- | src/window.h | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 274 | ||||
| -rw-r--r-- | src/xfaces.c | 111 | ||||
| -rw-r--r-- | src/xfns.c | 10 | ||||
| -rw-r--r-- | src/xftfont.c | 3 | ||||
| -rw-r--r-- | src/xmenu.c | 3 | ||||
| -rw-r--r-- | src/xml.c | 2 | ||||
| -rw-r--r-- | src/xselect.c | 16 | ||||
| -rw-r--r-- | src/xsettings.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 8 | ||||
| -rw-r--r-- | src/xterm.h | 3 |
104 files changed, 1158 insertions, 2128 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 0f2138284a0..1a2a973e694 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -70,6 +70,16 @@ define xgettype | |||
| 70 | set $type = (enum Lisp_Type) (USE_LSB_TAG ? $bugfix & (1 << GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS) | 70 | set $type = (enum Lisp_Type) (USE_LSB_TAG ? $bugfix & (1 << GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS) |
| 71 | end | 71 | end |
| 72 | 72 | ||
| 73 | # Access the name of a symbol | ||
| 74 | define xsymname | ||
| 75 | if (CHECK_LISP_OBJECT_TYPE) | ||
| 76 | set $bugfix = $arg0.i | ||
| 77 | else | ||
| 78 | set $bugfix = $arg0 | ||
| 79 | end | ||
| 80 | set $symname = ((struct Lisp_Symbol *) ((char *)lispsym + $bugfix))->name | ||
| 81 | end | ||
| 82 | |||
| 73 | # Set up something to print out s-expressions. | 83 | # Set up something to print out s-expressions. |
| 74 | # We save and restore print_output_debug_flag to prevent the w32 port | 84 | # We save and restore print_output_debug_flag to prevent the w32 port |
| 75 | # from calling OutputDebugString, which causes GDB to display each | 85 | # from calling OutputDebugString, which causes GDB to display each |
| @@ -1073,8 +1083,8 @@ end | |||
| 1073 | 1083 | ||
| 1074 | define xprintsym | 1084 | define xprintsym |
| 1075 | xgetptr $arg0 | 1085 | xgetptr $arg0 |
| 1076 | set $sym = (struct Lisp_Symbol *) $ptr | 1086 | xsymname $ptr |
| 1077 | xgetptr $sym->name | 1087 | xgetptr $symname |
| 1078 | set $sym_name = (struct Lisp_String *) $ptr | 1088 | set $sym_name = (struct Lisp_String *) $ptr |
| 1079 | xprintstr $sym_name | 1089 | xprintstr $sym_name |
| 1080 | end | 1090 | end |
| @@ -1258,8 +1268,8 @@ tbreak init_sys_modes | |||
| 1258 | commands | 1268 | commands |
| 1259 | silent | 1269 | silent |
| 1260 | xgetptr globals.f_Vinitial_window_system | 1270 | xgetptr globals.f_Vinitial_window_system |
| 1261 | set $tem = (struct Lisp_Symbol *) $ptr | 1271 | xsymname $ptr |
| 1262 | xgetptr $tem->name | 1272 | xgetptr $symname |
| 1263 | set $tem = (struct Lisp_String *) $ptr | 1273 | set $tem = (struct Lisp_String *) $ptr |
| 1264 | set $tem = (char *) $tem->data | 1274 | set $tem = (char *) $tem->data |
| 1265 | # If we are running in synchronous mode, we want a chance to look | 1275 | # If we are running in synchronous mode, we want a chance to look |
diff --git a/src/ChangeLog b/src/ChangeLog index 8cf269680de..8f441be3307 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,246 @@ | |||
| 1 | 2015-01-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Port to MSB hosts without optimization | ||
| 4 | E.g., when configuring --with-wide-int CFLAGS='-O0' on x86, | ||
| 5 | the inline function XTYPE needs to be declared before being used. | ||
| 6 | * lisp.h (XTYPE): New forward declaration. | ||
| 7 | |||
| 8 | 2015-01-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 9 | |||
| 10 | Port to 32-bit --with-wide-int | ||
| 11 | Prefer symbol indexes to struct Lisp_Symbol * casted and then | ||
| 12 | widened, as the latter had trouble with GCC on Fedora 21 when | ||
| 13 | configured --with-wide-int and when used in static initializers. | ||
| 14 | * alloc.c (garbage_collect_1, which_symbols): | ||
| 15 | * lread.c (init_obarray): | ||
| 16 | Prefer builtin_lisp_symbol when it can be used. | ||
| 17 | * dispextern.h (struct image_type.type): | ||
| 18 | * font.c (font_property_table.key): | ||
| 19 | * frame.c (struct frame_parm_table.sym): | ||
| 20 | * keyboard.c (scroll_bar_parts, struct event_head): | ||
| 21 | * xdisp.c (struct props.name): | ||
| 22 | Use the index of a builtin symbol rather than its address. | ||
| 23 | All uses changed. | ||
| 24 | * lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ... | ||
| 25 | (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with | ||
| 26 | symbol indexes rather than pointers, and which work better on MSB | ||
| 27 | hosts because they shift right before tagging. All uses changed. | ||
| 28 | (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END): | ||
| 29 | No longer noops on wide-int hosts, since they work now. | ||
| 30 | (builtin_lisp_symbol): New function. | ||
| 31 | |||
| 32 | Port to HAVE_FREETYPE && !HAVE_XFT | ||
| 33 | * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]: | ||
| 34 | * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]: | ||
| 35 | Declare in this case too. | ||
| 36 | |||
| 37 | 2015-01-10 Eli Zaretskii <eliz@gnu.org> | ||
| 38 | |||
| 39 | * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI. | ||
| 40 | |||
| 41 | * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use | ||
| 42 | make_pointer_integer instead of XIL. | ||
| 43 | (Fw32notify_rm_watch): Use XINTPTR instead of XLI. | ||
| 44 | |||
| 45 | * w32inevt.c (handle_file_notifications): Use make_pointer_integer | ||
| 46 | instead of XIL. Put a list of the descriptor, action, and file | ||
| 47 | name in event->arg, instead of spreading them between event->code | ||
| 48 | and event->arg. | ||
| 49 | |||
| 50 | * w32term.c (queue_notifications): Use make_pointer_integer | ||
| 51 | instead of XIL. Put a list of the descriptor, action, and file | ||
| 52 | name in event->arg, instead of spreading them between event->code | ||
| 53 | and event->arg. | ||
| 54 | |||
| 55 | * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp | ||
| 56 | event creation to changes in w32term.c and w32inevt.c above. | ||
| 57 | |||
| 58 | 2015-01-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 59 | |||
| 60 | Port Qnil==0 changes to 32-bit --with-wide-int | ||
| 61 | * lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the | ||
| 62 | macro-implemented version. For the non-USE_LSB_TAG case, supply | ||
| 63 | a new inline function that is the inverse of the new TAG_SYMPTR. | ||
| 64 | (lisp_h_XUNTAGBASE, XUNTAGBASE): Remove. All uses removed. | ||
| 65 | (TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a | ||
| 66 | negative number, don't allow sign bits to bleed into the encoded | ||
| 67 | value. Shift in zero bits instead. | ||
| 68 | |||
| 69 | Refactor pointer-to-integer conversion | ||
| 70 | * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): | ||
| 71 | Rename and move to lisp.h. All uses changed. | ||
| 72 | * lisp.h (XINTPTR, make_pointer_integer): New inline functions, | ||
| 73 | which are renamed from gfilenotify.c's lisp_to_monitor and | ||
| 74 | monitor_to_lisp, and with more-generic void * signatures. | ||
| 75 | |||
| 76 | 2015-01-08 Eli Zaretskii <eliz@gnu.org> | ||
| 77 | |||
| 78 | * dispnew.c (buffer_posn_from_coords): Fix the value of the column | ||
| 79 | returned for right-to-left screen lines. (Before the change on | ||
| 80 | 2014-12-30, the incorrectly-computed X pixel coordinate concealed | ||
| 81 | this bug.) | ||
| 82 | |||
| 83 | * .gdbinit (xsymname): New subroutine. | ||
| 84 | (xprintsym, initial-tbreak): Use it to access the name of a symbol | ||
| 85 | in a way that doesn't cause GDB to barf when it tries to | ||
| 86 | dereference a NULL pointer. | ||
| 87 | |||
| 88 | * xdisp.c (next_element_from_c_string): Use Lisp integer zero as | ||
| 89 | the object. | ||
| 90 | (set_cursor_from_row, try_cursor_movement, dump_glyph) | ||
| 91 | (insert_left_trunc_glyphs, append_space_for_newline) | ||
| 92 | (extend_face_to_end_of_line, highlight_trailing_whitespace) | ||
| 93 | (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually) | ||
| 94 | (Fbidi_resolved_levels, produce_special_glyphs) | ||
| 95 | (rows_from_pos_range, mouse_face_from_buffer_pos) | ||
| 96 | (note_mouse_highlight): Use nil as the object for glyphs inserted | ||
| 97 | by the display engine, and test with NILP instead of INTEGERP. | ||
| 98 | (Bug#19535) | ||
| 99 | |||
| 100 | * w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by | ||
| 101 | the display engine. | ||
| 102 | |||
| 103 | * xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by | ||
| 104 | the display engine. | ||
| 105 | |||
| 106 | * dispextern.h (struct glyph, struct it): Update comments for the | ||
| 107 | OBJECT members. | ||
| 108 | |||
| 109 | 2015-01-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 110 | |||
| 111 | Port new Lisp symbol init to x86 --with-wide-int | ||
| 112 | * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END): | ||
| 113 | Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as | ||
| 114 | GCC (at least) does not allow a constant initializer to widen an | ||
| 115 | address constant. | ||
| 116 | |||
| 117 | * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL. | ||
| 118 | This is a followup to the "Port Qnil==0 XUNTAG to clang" patch. | ||
| 119 | Although clang doesn't need it, some other compiler might, and | ||
| 120 | it's easy enough to be safe. | ||
| 121 | |||
| 122 | * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0. | ||
| 123 | Apparently clang removed support for the alloc_size attribute. | ||
| 124 | |||
| 125 | Port Qnil==0 XUNTAG to clang | ||
| 126 | clang has undefined behavior if the program subtracts an integer | ||
| 127 | from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in: | ||
| 128 | http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html | ||
| 129 | * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]: | ||
| 130 | (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0. | ||
| 131 | |||
| 132 | Port GFileMonitor * hack to Qnil==0 platforms | ||
| 133 | Reported by Glenn Morris in: http://bugs.gnu.org/15880#112 | ||
| 134 | * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions. | ||
| 135 | (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them. | ||
| 136 | |||
| 137 | 2015-01-06 Jan Djärv <jan.h.d@swipnet.se> | ||
| 138 | |||
| 139 | * nsterm.m (x_set_window_size): Call updateFrameSize to get real | ||
| 140 | size instead of using widht/height. The frame may be constrained. | ||
| 141 | |||
| 142 | 2015-01-05 Paul Eggert <eggert@cs.ucla.edu> | ||
| 143 | |||
| 144 | * lisp.h (XSYMBOL): Parenthesize id in forward decl. | ||
| 145 | Needed when neither optimizing nor inlining. | ||
| 146 | Also, sort decls alphabetically. | ||
| 147 | |||
| 148 | 2015-01-05 Eli Zaretskii <eliz@gnu.org> | ||
| 149 | |||
| 150 | * w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c: | ||
| 151 | * w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove | ||
| 152 | declarations of Q* variables that represent symbols. | ||
| 153 | |||
| 154 | 2015-01-05 Paul Eggert <eggert@cs.ucla.edu> | ||
| 155 | |||
| 156 | Use 0 for Qnil | ||
| 157 | Fixes Bug#15880. | ||
| 158 | If USE_LSB_TAG, arrange for the representation of Qnil to be zero so | ||
| 159 | that NILP (x) is equivalent to testing whether x is 0 at the | ||
| 160 | machine level. The overall effects of this and the previous patch | ||
| 161 | shrink the size of the text segment by 2.3% and speeds up | ||
| 162 | compilation of all the .elc files by about 0.5% on my platform, | ||
| 163 | which is Fedora 20 x86-64. | ||
| 164 | * lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG) | ||
| 165 | (make_lisp_symbol) [USE_LSB_TAG]: | ||
| 166 | Symbols now tag the difference from lispsym, not the pointer. | ||
| 167 | (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros. | ||
| 168 | (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons): | ||
| 169 | Renumber so that Lisp_Symbol is 0, so that Qnil is zero. | ||
| 170 | (XSYMBOL): New forward decl. | ||
| 171 | (XUNTAGBASE): New function. | ||
| 172 | (XUNTAG): Use it. | ||
| 173 | |||
| 174 | Compute C decls for DEFSYMs automatically | ||
| 175 | Fixes Bug#15880. | ||
| 176 | This patch also makes Q constants (e.g., Qnil) constant addresses | ||
| 177 | from the C point of view. | ||
| 178 | * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c: | ||
| 179 | * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c: | ||
| 180 | * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c: | ||
| 181 | * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c: | ||
| 182 | * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c: | ||
| 183 | * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c: | ||
| 184 | * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m: | ||
| 185 | * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c: | ||
| 186 | * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c: | ||
| 187 | * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c: | ||
| 188 | * xselect.c, xsettings.c, xterm.c: | ||
| 189 | Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs). | ||
| 190 | These names are now defined automatically by make-docfile. | ||
| 191 | * alloc.c (init_symbol): New function. | ||
| 192 | (Fmake_symbol): Use it. | ||
| 193 | (c_symbol_p): New function. | ||
| 194 | (valid_lisp_object_p, purecopy): Use it. | ||
| 195 | * alloc.c (marked_pinned_symbols): | ||
| 196 | Use make_lisp_symbol instead of make_lisp_ptr. | ||
| 197 | (garbage_collect_1): Mark lispsym symbols. | ||
| 198 | (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro. | ||
| 199 | (mark_object): Use it. | ||
| 200 | (sweep_symbols): Sweep lispsym symbols. | ||
| 201 | (symbol_uses_obj): New function. | ||
| 202 | (which_symbols): Use it. Work for lispsym symbols, too. | ||
| 203 | (init_alloc_once): Initialize Vpurify_flag here; no need to wait, | ||
| 204 | since Qt's address is already known now. | ||
| 205 | (syms_of_alloc): Add lispsym count to symbols_consed. | ||
| 206 | * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0), | ||
| 207 | when testing whether storage is all bits zero. | ||
| 208 | * dispextern.h (struct image_type): | ||
| 209 | * font.c (font_property_table): | ||
| 210 | * frame.c (struct frame_parm_table, frame_parms): | ||
| 211 | * keyboard.c (scroll_bar_parts, struct event_head): | ||
| 212 | * xdisp.c (struct props): | ||
| 213 | Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and | ||
| 214 | Lisp_Object *, since Qfoo is no longer an object whose address can be | ||
| 215 | taken. All uses changed. | ||
| 216 | * eval.c (run_hook): New function. Most uses of Frun_hooks changed to | ||
| 217 | use it, so that they no longer need to take the address of a Lisp sym. | ||
| 218 | (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable. | ||
| 219 | * frame.c (syms_of_frame): Add defsyms for the frame_parms table. | ||
| 220 | * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here. | ||
| 221 | DEFSYM Qdeactivate_mark before the corresponding var. | ||
| 222 | * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line | ||
| 223 | instead of interning their symbols; this avoids duplicates. | ||
| 224 | (LISP_INITIALLY, TAG_PTR) | ||
| 225 | (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT): | ||
| 226 | New macros. | ||
| 227 | (LISP_INITIALLY_ZERO): Use it. | ||
| 228 | (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol) | ||
| 229 | (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*): | ||
| 230 | Move decls up, to avoid forward uses. Include globals.h earlier, too. | ||
| 231 | (make_lisp_symbol): New function. | ||
| 232 | (XSETSYMBOL): Use it. | ||
| 233 | (DEFSYM): Now just a placeholder for make-docfile. | ||
| 234 | * lread.c (DEFINE_SYMBOLS): Define, for globals.h. | ||
| 235 | (intern_sym): New function, with body taken from old intern_driver. | ||
| 236 | (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t. | ||
| 237 | All uses changed. | ||
| 238 | (define_symbol): New function. | ||
| 239 | (init_obarray): Define the C symbols taken from lispsym. | ||
| 240 | Use plain DEFSYM for Qt and Qnil. | ||
| 241 | * syntax.c (init_syntax_once): No need to worry about | ||
| 242 | Qchar_table_extra_slots. | ||
| 243 | |||
| 1 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> | 244 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 245 | ||
| 3 | 'temacs -nw' should not call missing functions | 246 | 'temacs -nw' should not call missing functions |
| @@ -146,6 +389,10 @@ | |||
| 146 | * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert | 389 | * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert |
| 147 | when going to fullscreen (Bug#0x180004f). | 390 | when going to fullscreen (Bug#0x180004f). |
| 148 | 391 | ||
| 392 | 2014-12-27 Eli Zaretskii <eliz@gnu.org> | ||
| 393 | |||
| 394 | * window.c (Fwindow_body_width): Doc fix. (Bug#19395) | ||
| 395 | |||
| 149 | 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca> | 396 | 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 150 | 397 | ||
| 151 | * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring. | 398 | * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring. |
diff --git a/src/alloc.c b/src/alloc.c index ecea3e8ac7d..7c937332407 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -263,23 +263,6 @@ no_sanitize_memcpy (void *dest, void const *src, size_t size) | |||
| 263 | 263 | ||
| 264 | #endif /* MAX_SAVE_STACK > 0 */ | 264 | #endif /* MAX_SAVE_STACK > 0 */ |
| 265 | 265 | ||
| 266 | static Lisp_Object Qconses; | ||
| 267 | static Lisp_Object Qsymbols; | ||
| 268 | static Lisp_Object Qmiscs; | ||
| 269 | static Lisp_Object Qstrings; | ||
| 270 | static Lisp_Object Qvectors; | ||
| 271 | static Lisp_Object Qfloats; | ||
| 272 | static Lisp_Object Qintervals; | ||
| 273 | static Lisp_Object Qbuffers; | ||
| 274 | static Lisp_Object Qstring_bytes, Qvector_slots, Qheap; | ||
| 275 | static Lisp_Object Qgc_cons_threshold; | ||
| 276 | Lisp_Object Qautomatic_gc; | ||
| 277 | Lisp_Object Qchar_table_extra_slots; | ||
| 278 | |||
| 279 | /* Hook run after GC has finished. */ | ||
| 280 | |||
| 281 | static Lisp_Object Qpost_gc_hook; | ||
| 282 | |||
| 283 | static void mark_terminals (void); | 266 | static void mark_terminals (void); |
| 284 | static void gc_sweep (void); | 267 | static void gc_sweep (void); |
| 285 | static Lisp_Object make_pure_vector (ptrdiff_t); | 268 | static Lisp_Object make_pure_vector (ptrdiff_t); |
| @@ -3410,13 +3393,29 @@ set_symbol_name (Lisp_Object sym, Lisp_Object name) | |||
| 3410 | XSYMBOL (sym)->name = name; | 3393 | XSYMBOL (sym)->name = name; |
| 3411 | } | 3394 | } |
| 3412 | 3395 | ||
| 3396 | void | ||
| 3397 | init_symbol (Lisp_Object val, Lisp_Object name) | ||
| 3398 | { | ||
| 3399 | struct Lisp_Symbol *p = XSYMBOL (val); | ||
| 3400 | set_symbol_name (val, name); | ||
| 3401 | set_symbol_plist (val, Qnil); | ||
| 3402 | p->redirect = SYMBOL_PLAINVAL; | ||
| 3403 | SET_SYMBOL_VAL (p, Qunbound); | ||
| 3404 | set_symbol_function (val, Qnil); | ||
| 3405 | set_symbol_next (val, NULL); | ||
| 3406 | p->gcmarkbit = false; | ||
| 3407 | p->interned = SYMBOL_UNINTERNED; | ||
| 3408 | p->constant = 0; | ||
| 3409 | p->declared_special = false; | ||
| 3410 | p->pinned = false; | ||
| 3411 | } | ||
| 3412 | |||
| 3413 | DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, | 3413 | DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, |
| 3414 | doc: /* Return a newly allocated uninterned symbol whose name is NAME. | 3414 | doc: /* Return a newly allocated uninterned symbol whose name is NAME. |
| 3415 | Its value is void, and its function definition and property list are nil. */) | 3415 | Its value is void, and its function definition and property list are nil. */) |
| 3416 | (Lisp_Object name) | 3416 | (Lisp_Object name) |
| 3417 | { | 3417 | { |
| 3418 | register Lisp_Object val; | 3418 | Lisp_Object val; |
| 3419 | register struct Lisp_Symbol *p; | ||
| 3420 | 3419 | ||
| 3421 | CHECK_STRING (name); | 3420 | CHECK_STRING (name); |
| 3422 | 3421 | ||
| @@ -3444,18 +3443,7 @@ Its value is void, and its function definition and property list are nil. */) | |||
| 3444 | 3443 | ||
| 3445 | MALLOC_UNBLOCK_INPUT; | 3444 | MALLOC_UNBLOCK_INPUT; |
| 3446 | 3445 | ||
| 3447 | p = XSYMBOL (val); | 3446 | init_symbol (val, name); |
| 3448 | set_symbol_name (val, name); | ||
| 3449 | set_symbol_plist (val, Qnil); | ||
| 3450 | p->redirect = SYMBOL_PLAINVAL; | ||
| 3451 | SET_SYMBOL_VAL (p, Qunbound); | ||
| 3452 | set_symbol_function (val, Qnil); | ||
| 3453 | set_symbol_next (val, NULL); | ||
| 3454 | p->gcmarkbit = false; | ||
| 3455 | p->interned = SYMBOL_UNINTERNED; | ||
| 3456 | p->constant = 0; | ||
| 3457 | p->declared_special = false; | ||
| 3458 | p->pinned = false; | ||
| 3459 | consing_since_gc += sizeof (struct Lisp_Symbol); | 3447 | consing_since_gc += sizeof (struct Lisp_Symbol); |
| 3460 | symbols_consed++; | 3448 | symbols_consed++; |
| 3461 | total_free_symbols--; | 3449 | total_free_symbols--; |
| @@ -4925,6 +4913,14 @@ mark_stack (void *end) | |||
| 4925 | 4913 | ||
| 4926 | #endif /* GC_MARK_STACK != 0 */ | 4914 | #endif /* GC_MARK_STACK != 0 */ |
| 4927 | 4915 | ||
| 4916 | static bool | ||
| 4917 | c_symbol_p (struct Lisp_Symbol *sym) | ||
| 4918 | { | ||
| 4919 | char *lispsym_ptr = (char *) lispsym; | ||
| 4920 | char *sym_ptr = (char *) sym; | ||
| 4921 | ptrdiff_t lispsym_offset = sym_ptr - lispsym_ptr; | ||
| 4922 | return 0 <= lispsym_offset && lispsym_offset < sizeof lispsym; | ||
| 4923 | } | ||
| 4928 | 4924 | ||
| 4929 | /* Determine whether it is safe to access memory at address P. */ | 4925 | /* Determine whether it is safe to access memory at address P. */ |
| 4930 | static int | 4926 | static int |
| @@ -4978,6 +4974,9 @@ valid_lisp_object_p (Lisp_Object obj) | |||
| 4978 | if (PURE_POINTER_P (p)) | 4974 | if (PURE_POINTER_P (p)) |
| 4979 | return 1; | 4975 | return 1; |
| 4980 | 4976 | ||
| 4977 | if (SYMBOLP (obj) && c_symbol_p (p)) | ||
| 4978 | return ((char *) p - (char *) lispsym) % sizeof lispsym[0] == 0; | ||
| 4979 | |||
| 4981 | if (p == &buffer_defaults || p == &buffer_local_symbols) | 4980 | if (p == &buffer_defaults || p == &buffer_local_symbols) |
| 4982 | return 2; | 4981 | return 2; |
| 4983 | 4982 | ||
| @@ -5343,7 +5342,7 @@ purecopy (Lisp_Object obj) | |||
| 5343 | } | 5342 | } |
| 5344 | else if (SYMBOLP (obj)) | 5343 | else if (SYMBOLP (obj)) |
| 5345 | { | 5344 | { |
| 5346 | if (!XSYMBOL (obj)->pinned) | 5345 | if (!XSYMBOL (obj)->pinned && !c_symbol_p (XSYMBOL (obj))) |
| 5347 | { /* We can't purify them, but they appear in many pure objects. | 5346 | { /* We can't purify them, but they appear in many pure objects. |
| 5348 | Mark them as `pinned' so we know to mark them at every GC cycle. */ | 5347 | Mark them as `pinned' so we know to mark them at every GC cycle. */ |
| 5349 | XSYMBOL (obj)->pinned = true; | 5348 | XSYMBOL (obj)->pinned = true; |
| @@ -5532,7 +5531,7 @@ mark_pinned_symbols (void) | |||
| 5532 | union aligned_Lisp_Symbol *sym = sblk->symbols, *end = sym + lim; | 5531 | union aligned_Lisp_Symbol *sym = sblk->symbols, *end = sym + lim; |
| 5533 | for (; sym < end; ++sym) | 5532 | for (; sym < end; ++sym) |
| 5534 | if (sym->s.pinned) | 5533 | if (sym->s.pinned) |
| 5535 | mark_object (make_lisp_ptr (&sym->s, Lisp_Symbol)); | 5534 | mark_object (make_lisp_symbol (&sym->s)); |
| 5536 | 5535 | ||
| 5537 | lim = SYMBOL_BLOCK_SIZE; | 5536 | lim = SYMBOL_BLOCK_SIZE; |
| 5538 | } | 5537 | } |
| @@ -5566,7 +5565,7 @@ garbage_collect_1 (void *end) | |||
| 5566 | return Qnil; | 5565 | return Qnil; |
| 5567 | 5566 | ||
| 5568 | /* Record this function, so it appears on the profiler's backtraces. */ | 5567 | /* Record this function, so it appears on the profiler's backtraces. */ |
| 5569 | record_in_backtrace (Qautomatic_gc, &Qnil, 0); | 5568 | record_in_backtrace (Qautomatic_gc, 0, 0); |
| 5570 | 5569 | ||
| 5571 | check_cons_list (); | 5570 | check_cons_list (); |
| 5572 | 5571 | ||
| @@ -5630,6 +5629,9 @@ garbage_collect_1 (void *end) | |||
| 5630 | mark_buffer (&buffer_defaults); | 5629 | mark_buffer (&buffer_defaults); |
| 5631 | mark_buffer (&buffer_local_symbols); | 5630 | mark_buffer (&buffer_local_symbols); |
| 5632 | 5631 | ||
| 5632 | for (i = 0; i < ARRAYELTS (lispsym); i++) | ||
| 5633 | mark_object (builtin_lisp_symbol (i)); | ||
| 5634 | |||
| 5633 | for (i = 0; i < staticidx; i++) | 5635 | for (i = 0; i < staticidx; i++) |
| 5634 | mark_object (*staticvec[i]); | 5636 | mark_object (*staticvec[i]); |
| 5635 | 5637 | ||
| @@ -6193,17 +6195,28 @@ mark_object (Lisp_Object arg) | |||
| 6193 | emacs_abort (); \ | 6195 | emacs_abort (); \ |
| 6194 | } while (0) | 6196 | } while (0) |
| 6195 | 6197 | ||
| 6196 | /* Check both of the above conditions. */ | 6198 | /* Check both of the above conditions, for non-symbols. */ |
| 6197 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) \ | 6199 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) \ |
| 6198 | do { \ | 6200 | do { \ |
| 6199 | CHECK_ALLOCATED (); \ | 6201 | CHECK_ALLOCATED (); \ |
| 6200 | CHECK_LIVE (LIVEP); \ | 6202 | CHECK_LIVE (LIVEP); \ |
| 6201 | } while (0) \ | 6203 | } while (0) \ |
| 6202 | 6204 | ||
| 6205 | /* Check both of the above conditions, for symbols. */ | ||
| 6206 | #define CHECK_ALLOCATED_AND_LIVE_SYMBOL() \ | ||
| 6207 | do { \ | ||
| 6208 | if (!c_symbol_p (ptr)) \ | ||
| 6209 | { \ | ||
| 6210 | CHECK_ALLOCATED (); \ | ||
| 6211 | CHECK_LIVE (live_symbol_p); \ | ||
| 6212 | } \ | ||
| 6213 | } while (0) \ | ||
| 6214 | |||
| 6203 | #else /* not GC_CHECK_MARKED_OBJECTS */ | 6215 | #else /* not GC_CHECK_MARKED_OBJECTS */ |
| 6204 | 6216 | ||
| 6205 | #define CHECK_LIVE(LIVEP) ((void) 0) | 6217 | #define CHECK_LIVE(LIVEP) ((void) 0) |
| 6206 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0) | 6218 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0) |
| 6219 | #define CHECK_ALLOCATED_AND_LIVE_SYMBOL() ((void) 0) | ||
| 6207 | 6220 | ||
| 6208 | #endif /* not GC_CHECK_MARKED_OBJECTS */ | 6221 | #endif /* not GC_CHECK_MARKED_OBJECTS */ |
| 6209 | 6222 | ||
| @@ -6363,7 +6376,7 @@ mark_object (Lisp_Object arg) | |||
| 6363 | nextsym: | 6376 | nextsym: |
| 6364 | if (ptr->gcmarkbit) | 6377 | if (ptr->gcmarkbit) |
| 6365 | break; | 6378 | break; |
| 6366 | CHECK_ALLOCATED_AND_LIVE (live_symbol_p); | 6379 | CHECK_ALLOCATED_AND_LIVE_SYMBOL (); |
| 6367 | ptr->gcmarkbit = 1; | 6380 | ptr->gcmarkbit = 1; |
| 6368 | /* Attempt to catch bogus objects. */ | 6381 | /* Attempt to catch bogus objects. */ |
| 6369 | eassert (valid_lisp_object_p (ptr->function)); | 6382 | eassert (valid_lisp_object_p (ptr->function)); |
| @@ -6720,13 +6733,16 @@ NO_INLINE /* For better stack traces */ | |||
| 6720 | static void | 6733 | static void |
| 6721 | sweep_symbols (void) | 6734 | sweep_symbols (void) |
| 6722 | { | 6735 | { |
| 6723 | register struct symbol_block *sblk; | 6736 | struct symbol_block *sblk; |
| 6724 | struct symbol_block **sprev = &symbol_block; | 6737 | struct symbol_block **sprev = &symbol_block; |
| 6725 | register int lim = symbol_block_index; | 6738 | int lim = symbol_block_index; |
| 6726 | EMACS_INT num_free = 0, num_used = 0; | 6739 | EMACS_INT num_free = 0, num_used = ARRAYELTS (lispsym); |
| 6727 | 6740 | ||
| 6728 | symbol_free_list = NULL; | 6741 | symbol_free_list = NULL; |
| 6729 | 6742 | ||
| 6743 | for (int i = 0; i < ARRAYELTS (lispsym); i++) | ||
| 6744 | lispsym[i].gcmarkbit = 0; | ||
| 6745 | |||
| 6730 | for (sblk = symbol_block; sblk; sblk = *sprev) | 6746 | for (sblk = symbol_block; sblk; sblk = *sprev) |
| 6731 | { | 6747 | { |
| 6732 | int this_free = 0; | 6748 | int this_free = 0; |
| @@ -6974,6 +6990,21 @@ Frames, windows, buffers, and subprocesses count as vectors | |||
| 6974 | bounded_number (strings_consed)); | 6990 | bounded_number (strings_consed)); |
| 6975 | } | 6991 | } |
| 6976 | 6992 | ||
| 6993 | static bool | ||
| 6994 | symbol_uses_obj (Lisp_Object symbol, Lisp_Object obj) | ||
| 6995 | { | ||
| 6996 | struct Lisp_Symbol *sym = XSYMBOL (symbol); | ||
| 6997 | Lisp_Object val = find_symbol_value (symbol); | ||
| 6998 | return (EQ (val, obj) | ||
| 6999 | || EQ (sym->function, obj) | ||
| 7000 | || (!NILP (sym->function) | ||
| 7001 | && COMPILEDP (sym->function) | ||
| 7002 | && EQ (AREF (sym->function, COMPILED_BYTECODE), obj)) | ||
| 7003 | || (!NILP (val) | ||
| 7004 | && COMPILEDP (val) | ||
| 7005 | && EQ (AREF (val, COMPILED_BYTECODE), obj))); | ||
| 7006 | } | ||
| 7007 | |||
| 6977 | /* Find at most FIND_MAX symbols which have OBJ as their value or | 7008 | /* Find at most FIND_MAX symbols which have OBJ as their value or |
| 6978 | function. This is used in gdbinit's `xwhichsymbols' command. */ | 7009 | function. This is used in gdbinit's `xwhichsymbols' command. */ |
| 6979 | 7010 | ||
| @@ -6986,6 +7017,17 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6986 | 7017 | ||
| 6987 | if (! DEADP (obj)) | 7018 | if (! DEADP (obj)) |
| 6988 | { | 7019 | { |
| 7020 | for (int i = 0; i < ARRAYELTS (lispsym); i++) | ||
| 7021 | { | ||
| 7022 | Lisp_Object sym = builtin_lisp_symbol (i); | ||
| 7023 | if (symbol_uses_obj (sym, obj)) | ||
| 7024 | { | ||
| 7025 | found = Fcons (sym, found); | ||
| 7026 | if (--find_max == 0) | ||
| 7027 | goto out; | ||
| 7028 | } | ||
| 7029 | } | ||
| 7030 | |||
| 6989 | for (sblk = symbol_block; sblk; sblk = sblk->next) | 7031 | for (sblk = symbol_block; sblk; sblk = sblk->next) |
| 6990 | { | 7032 | { |
| 6991 | union aligned_Lisp_Symbol *aligned_sym = sblk->symbols; | 7033 | union aligned_Lisp_Symbol *aligned_sym = sblk->symbols; |
| @@ -6993,25 +7035,13 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6993 | 7035 | ||
| 6994 | for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++) | 7036 | for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++) |
| 6995 | { | 7037 | { |
| 6996 | struct Lisp_Symbol *sym = &aligned_sym->s; | ||
| 6997 | Lisp_Object val; | ||
| 6998 | Lisp_Object tem; | ||
| 6999 | |||
| 7000 | if (sblk == symbol_block && bn >= symbol_block_index) | 7038 | if (sblk == symbol_block && bn >= symbol_block_index) |
| 7001 | break; | 7039 | break; |
| 7002 | 7040 | ||
| 7003 | XSETSYMBOL (tem, sym); | 7041 | Lisp_Object sym = make_lisp_symbol (&aligned_sym->s); |
| 7004 | val = find_symbol_value (tem); | 7042 | if (symbol_uses_obj (sym, obj)) |
| 7005 | if (EQ (val, obj) | ||
| 7006 | || EQ (sym->function, obj) | ||
| 7007 | || (!NILP (sym->function) | ||
| 7008 | && COMPILEDP (sym->function) | ||
| 7009 | && EQ (AREF (sym->function, COMPILED_BYTECODE), obj)) | ||
| 7010 | || (!NILP (val) | ||
| 7011 | && COMPILEDP (val) | ||
| 7012 | && EQ (AREF (val, COMPILED_BYTECODE), obj))) | ||
| 7013 | { | 7043 | { |
| 7014 | found = Fcons (tem, found); | 7044 | found = Fcons (sym, found); |
| 7015 | if (--find_max == 0) | 7045 | if (--find_max == 0) |
| 7016 | goto out; | 7046 | goto out; |
| 7017 | } | 7047 | } |
| @@ -7154,7 +7184,9 @@ verify_alloca (void) | |||
| 7154 | void | 7184 | void |
| 7155 | init_alloc_once (void) | 7185 | init_alloc_once (void) |
| 7156 | { | 7186 | { |
| 7157 | /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ | 7187 | /* Even though Qt's contents are not set up, its address is known. */ |
| 7188 | Vpurify_flag = Qt; | ||
| 7189 | |||
| 7158 | purebeg = PUREBEG; | 7190 | purebeg = PUREBEG; |
| 7159 | pure_size = PURESIZE; | 7191 | pure_size = PURESIZE; |
| 7160 | 7192 | ||
| @@ -7230,6 +7262,7 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); | |||
| 7230 | 7262 | ||
| 7231 | DEFVAR_INT ("symbols-consed", symbols_consed, | 7263 | DEFVAR_INT ("symbols-consed", symbols_consed, |
| 7232 | doc: /* Number of symbols that have been consed so far. */); | 7264 | doc: /* Number of symbols that have been consed so far. */); |
| 7265 | symbols_consed += ARRAYELTS (lispsym); | ||
| 7233 | 7266 | ||
| 7234 | DEFVAR_INT ("string-chars-consed", string_chars_consed, | 7267 | DEFVAR_INT ("string-chars-consed", string_chars_consed, |
| 7235 | doc: /* Number of string characters that have been consed so far. */); | 7268 | doc: /* Number of string characters that have been consed so far. */); |
diff --git a/src/bidi.c b/src/bidi.c index ef0092f3d93..cbc1820c2a5 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -262,7 +262,6 @@ typedef enum { | |||
| 262 | } bidi_category_t; | 262 | } bidi_category_t; |
| 263 | 263 | ||
| 264 | static Lisp_Object paragraph_start_re, paragraph_separate_re; | 264 | static Lisp_Object paragraph_start_re, paragraph_separate_re; |
| 265 | static Lisp_Object Qparagraph_start, Qparagraph_separate; | ||
| 266 | 265 | ||
| 267 | 266 | ||
| 268 | /*********************************************************************** | 267 | /*********************************************************************** |
diff --git a/src/buffer.c b/src/buffer.c index 7023a515571..2ea69f38f91 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -118,41 +118,8 @@ static void reset_buffer_local_variables (struct buffer *, bool); | |||
| 118 | due to user rplac'ing this alist or its elements. */ | 118 | due to user rplac'ing this alist or its elements. */ |
| 119 | Lisp_Object Vbuffer_alist; | 119 | Lisp_Object Vbuffer_alist; |
| 120 | 120 | ||
| 121 | static Lisp_Object Qkill_buffer_query_functions; | ||
| 122 | |||
| 123 | /* Hook run before changing a major mode. */ | ||
| 124 | static Lisp_Object Qchange_major_mode_hook; | ||
| 125 | |||
| 126 | Lisp_Object Qfirst_change_hook; | ||
| 127 | Lisp_Object Qbefore_change_functions; | ||
| 128 | Lisp_Object Qafter_change_functions; | ||
| 129 | |||
| 130 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | ||
| 131 | static Lisp_Object Qpermanent_local_hook; | ||
| 132 | |||
| 133 | static Lisp_Object Qprotected_field; | ||
| 134 | |||
| 135 | static Lisp_Object QSFundamental; /* A string "Fundamental". */ | 121 | static Lisp_Object QSFundamental; /* A string "Fundamental". */ |
| 136 | 122 | ||
| 137 | static Lisp_Object Qkill_buffer_hook; | ||
| 138 | static Lisp_Object Qbuffer_list_update_hook; | ||
| 139 | |||
| 140 | static Lisp_Object Qget_file_buffer; | ||
| 141 | |||
| 142 | static Lisp_Object Qoverlayp; | ||
| 143 | |||
| 144 | Lisp_Object Qpriority, Qbefore_string, Qafter_string; | ||
| 145 | |||
| 146 | static Lisp_Object Qevaporate; | ||
| 147 | |||
| 148 | Lisp_Object Qmodification_hooks; | ||
| 149 | Lisp_Object Qinsert_in_front_hooks; | ||
| 150 | Lisp_Object Qinsert_behind_hooks; | ||
| 151 | |||
| 152 | Lisp_Object Qchoice, Qrange, Qleft, Qright; | ||
| 153 | Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar; | ||
| 154 | static Lisp_Object Qoverwrite_mode, Qfraction; | ||
| 155 | |||
| 156 | static void alloc_buffer_text (struct buffer *, ptrdiff_t); | 123 | static void alloc_buffer_text (struct buffer *, ptrdiff_t); |
| 157 | static void free_buffer_text (struct buffer *b); | 124 | static void free_buffer_text (struct buffer *b); |
| 158 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); | 125 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); |
| @@ -1719,7 +1686,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1719 | return unbind_to (count, Qt); | 1686 | return unbind_to (count, Qt); |
| 1720 | 1687 | ||
| 1721 | /* Then run the hooks. */ | 1688 | /* Then run the hooks. */ |
| 1722 | Frun_hooks (1, &Qkill_buffer_hook); | 1689 | run_hook (Qkill_buffer_hook); |
| 1723 | unbind_to (count, Qnil); | 1690 | unbind_to (count, Qnil); |
| 1724 | } | 1691 | } |
| 1725 | 1692 | ||
| @@ -2748,7 +2715,7 @@ The first thing this function does is run | |||
| 2748 | the normal hook `change-major-mode-hook'. */) | 2715 | the normal hook `change-major-mode-hook'. */) |
| 2749 | (void) | 2716 | (void) |
| 2750 | { | 2717 | { |
| 2751 | Frun_hooks (1, &Qchange_major_mode_hook); | 2718 | run_hook (Qchange_major_mode_hook); |
| 2752 | 2719 | ||
| 2753 | /* Make sure none of the bindings in local_var_alist | 2720 | /* Make sure none of the bindings in local_var_alist |
| 2754 | remain swapped in, in their symbols. */ | 2721 | remain swapped in, in their symbols. */ |
| @@ -5071,9 +5038,9 @@ init_buffer_once (void) | |||
| 5071 | /* Make sure all markable slots in buffer_defaults | 5038 | /* Make sure all markable slots in buffer_defaults |
| 5072 | are initialized reasonably, so mark_buffer won't choke. */ | 5039 | are initialized reasonably, so mark_buffer won't choke. */ |
| 5073 | reset_buffer (&buffer_defaults); | 5040 | reset_buffer (&buffer_defaults); |
| 5074 | eassert (EQ (BVAR (&buffer_defaults, name), make_number (0))); | 5041 | eassert (NILP (BVAR (&buffer_defaults, name))); |
| 5075 | reset_buffer_local_variables (&buffer_defaults, 1); | 5042 | reset_buffer_local_variables (&buffer_defaults, 1); |
| 5076 | eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0))); | 5043 | eassert (NILP (BVAR (&buffer_local_symbols, name))); |
| 5077 | reset_buffer (&buffer_local_symbols); | 5044 | reset_buffer (&buffer_local_symbols); |
| 5078 | reset_buffer_local_variables (&buffer_local_symbols, 1); | 5045 | reset_buffer_local_variables (&buffer_local_symbols, 1); |
| 5079 | /* Prevent GC from getting confused. */ | 5046 | /* Prevent GC from getting confused. */ |
diff --git a/src/buffer.h b/src/buffer.h index 1b2b5b6a1b1..81852cae505 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -1141,12 +1141,6 @@ record_unwind_current_buffer (void) | |||
| 1141 | } while (false) | 1141 | } while (false) |
| 1142 | 1142 | ||
| 1143 | extern Lisp_Object Vbuffer_alist; | 1143 | extern Lisp_Object Vbuffer_alist; |
| 1144 | extern Lisp_Object Qbefore_change_functions; | ||
| 1145 | extern Lisp_Object Qafter_change_functions; | ||
| 1146 | extern Lisp_Object Qfirst_change_hook; | ||
| 1147 | extern Lisp_Object Qpriority, Qbefore_string, Qafter_string; | ||
| 1148 | extern Lisp_Object Qchoice, Qrange, Qleft, Qright; | ||
| 1149 | extern Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar; | ||
| 1150 | 1144 | ||
| 1151 | /* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is | 1145 | /* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is |
| 1152 | a `for' loop which iterates over the buffers from Vbuffer_alist. */ | 1146 | a `for' loop which iterates over the buffers from Vbuffer_alist. */ |
diff --git a/src/bytecode.c b/src/bytecode.c index 1d89d02e28f..b4583676835 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -69,7 +69,6 @@ by Hallvard: | |||
| 69 | 69 | ||
| 70 | #ifdef BYTE_CODE_METER | 70 | #ifdef BYTE_CODE_METER |
| 71 | 71 | ||
| 72 | Lisp_Object Qbyte_code_meter; | ||
| 73 | #define METER_2(code1, code2) AREF (AREF (Vbyte_code_meter, code1), code2) | 72 | #define METER_2(code1, code2) AREF (AREF (Vbyte_code_meter, code1), code2) |
| 74 | #define METER_1(code) METER_2 (0, code) | 73 | #define METER_1(code) METER_2 (0, code) |
| 75 | 74 | ||
diff --git a/src/callint.c b/src/callint.c index 200c9ed9d7d..25955039ac7 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -28,18 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include "window.h" | 28 | #include "window.h" |
| 29 | #include "keymap.h" | 29 | #include "keymap.h" |
| 30 | 30 | ||
| 31 | Lisp_Object Qminus, Qplus; | ||
| 32 | static Lisp_Object Qfuncall_interactively; | ||
| 33 | static Lisp_Object Qcommand_debug_status; | ||
| 34 | static Lisp_Object Qenable_recursive_minibuffers; | ||
| 35 | |||
| 36 | static Lisp_Object Qhandle_shift_selection; | ||
| 37 | static Lisp_Object Qread_number; | ||
| 38 | |||
| 39 | Lisp_Object Qmouse_leave_buffer_hook; | ||
| 40 | |||
| 41 | static Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qif; | ||
| 42 | Lisp_Object Qwhen, Qprogn; | ||
| 43 | static Lisp_Object preserved_fns; | 31 | static Lisp_Object preserved_fns; |
| 44 | 32 | ||
| 45 | /* Marker used within call-interactively to refer to point. */ | 33 | /* Marker used within call-interactively to refer to point. */ |
| @@ -477,7 +465,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 477 | error ("Attempt to select inactive minibuffer window"); | 465 | error ("Attempt to select inactive minibuffer window"); |
| 478 | 466 | ||
| 479 | /* If the current buffer wants to clean up, let it. */ | 467 | /* If the current buffer wants to clean up, let it. */ |
| 480 | Frun_hooks (1, &Qmouse_leave_buffer_hook); | 468 | run_hook (Qmouse_leave_buffer_hook); |
| 481 | 469 | ||
| 482 | Fselect_window (w, Qnil); | 470 | Fselect_window (w, Qnil); |
| 483 | } | 471 | } |
diff --git a/src/casefiddle.c b/src/casefiddle.c index 22680032c0d..8755353240a 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -30,8 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include "keymap.h" | 30 | #include "keymap.h" |
| 31 | 31 | ||
| 32 | enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; | 32 | enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; |
| 33 | |||
| 34 | Lisp_Object Qidentity; | ||
| 35 | 33 | ||
| 36 | static Lisp_Object | 34 | static Lisp_Object |
| 37 | casify_object (enum case_action flag, Lisp_Object obj) | 35 | casify_object (enum case_action flag, Lisp_Object obj) |
diff --git a/src/casetab.c b/src/casetab.c index 4bedc1771ce..b086abc0125 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 24 | #include "character.h" | 24 | #include "character.h" |
| 25 | #include "buffer.h" | 25 | #include "buffer.h" |
| 26 | 26 | ||
| 27 | static Lisp_Object Qcase_table_p, Qcase_table; | ||
| 28 | Lisp_Object Vascii_downcase_table; | 27 | Lisp_Object Vascii_downcase_table; |
| 29 | static Lisp_Object Vascii_upcase_table; | 28 | static Lisp_Object Vascii_upcase_table; |
| 30 | Lisp_Object Vascii_canon_table; | 29 | Lisp_Object Vascii_canon_table; |
diff --git a/src/category.c b/src/category.c index 09c78240a59..b20493e5949 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -53,8 +53,6 @@ bset_category_table (struct buffer *b, Lisp_Object val) | |||
| 53 | 53 | ||
| 54 | For the moment, we are not using this feature. */ | 54 | For the moment, we are not using this feature. */ |
| 55 | static int category_table_version; | 55 | static int category_table_version; |
| 56 | |||
| 57 | static Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p; | ||
| 58 | 56 | ||
| 59 | /* Category set staff. */ | 57 | /* Category set staff. */ |
| 60 | 58 | ||
| @@ -34,21 +34,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | #include "ccl.h" | 34 | #include "ccl.h" |
| 35 | #include "coding.h" | 35 | #include "coding.h" |
| 36 | 36 | ||
| 37 | Lisp_Object Qccl, Qcclp; | ||
| 38 | |||
| 39 | /* This symbol is a property which associates with ccl program vector. | ||
| 40 | Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */ | ||
| 41 | static Lisp_Object Qccl_program; | ||
| 42 | |||
| 43 | /* These symbols are properties which associate with code conversion | ||
| 44 | map and their ID respectively. */ | ||
| 45 | static Lisp_Object Qcode_conversion_map; | ||
| 46 | static Lisp_Object Qcode_conversion_map_id; | ||
| 47 | |||
| 48 | /* Symbols of ccl program have this property, a value of the property | ||
| 49 | is an index for Vccl_program_table. */ | ||
| 50 | static Lisp_Object Qccl_program_idx; | ||
| 51 | |||
| 52 | /* Table of registered CCL programs. Each element is a vector of | 37 | /* Table of registered CCL programs. Each element is a vector of |
| 53 | NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the | 38 | NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the |
| 54 | name of the program, CCL_PROG (vector) is the compiled code of the | 39 | name of the program, CCL_PROG (vector) is the compiled code of the |
| @@ -2297,8 +2282,17 @@ syms_of_ccl (void) | |||
| 2297 | 2282 | ||
| 2298 | DEFSYM (Qccl, "ccl"); | 2283 | DEFSYM (Qccl, "ccl"); |
| 2299 | DEFSYM (Qcclp, "cclp"); | 2284 | DEFSYM (Qcclp, "cclp"); |
| 2285 | |||
| 2286 | /* This symbol is a property which associates with ccl program vector. | ||
| 2287 | Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */ | ||
| 2300 | DEFSYM (Qccl_program, "ccl-program"); | 2288 | DEFSYM (Qccl_program, "ccl-program"); |
| 2289 | |||
| 2290 | /* Symbols of ccl program have this property, a value of the property | ||
| 2291 | is an index for Vccl_program_table. */ | ||
| 2301 | DEFSYM (Qccl_program_idx, "ccl-program-idx"); | 2292 | DEFSYM (Qccl_program_idx, "ccl-program-idx"); |
| 2293 | |||
| 2294 | /* These symbols are properties which associate with code conversion | ||
| 2295 | map and their ID respectively. */ | ||
| 2302 | DEFSYM (Qcode_conversion_map, "code-conversion-map"); | 2296 | DEFSYM (Qcode_conversion_map, "code-conversion-map"); |
| 2303 | DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id"); | 2297 | DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id"); |
| 2304 | 2298 | ||
| @@ -81,8 +81,6 @@ extern bool setup_ccl_program (struct ccl_program *, Lisp_Object); | |||
| 81 | extern void ccl_driver (struct ccl_program *, int *, int *, int, int, | 81 | extern void ccl_driver (struct ccl_program *, int *, int *, int, int, |
| 82 | Lisp_Object); | 82 | Lisp_Object); |
| 83 | 83 | ||
| 84 | extern Lisp_Object Qccl, Qcclp; | ||
| 85 | |||
| 86 | #define CHECK_CCL_PROGRAM(x) \ | 84 | #define CHECK_CCL_PROGRAM(x) \ |
| 87 | do { \ | 85 | do { \ |
| 88 | if (NILP (Fccl_program_p (x))) \ | 86 | if (NILP (Fccl_program_p (x))) \ |
diff --git a/src/character.c b/src/character.c index ad3fe129a33..4a5c7ec3156 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -48,16 +48,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 48 | 48 | ||
| 49 | #endif /* emacs */ | 49 | #endif /* emacs */ |
| 50 | 50 | ||
| 51 | Lisp_Object Qcharacterp; | ||
| 52 | |||
| 53 | static Lisp_Object Qauto_fill_chars; | ||
| 54 | |||
| 55 | /* Char-table of information about which character to unify to which | 51 | /* Char-table of information about which character to unify to which |
| 56 | Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ | 52 | Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ |
| 57 | Lisp_Object Vchar_unify_table; | 53 | Lisp_Object Vchar_unify_table; |
| 58 | 54 | ||
| 59 | static Lisp_Object Qchar_script_table; | ||
| 60 | |||
| 61 | 55 | ||
| 62 | 56 | ||
| 63 | /* If character code C has modifier masks, reflect them to the | 57 | /* If character code C has modifier masks, reflect them to the |
diff --git a/src/character.h b/src/character.h index 624f4fff3f0..5043880cb42 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -657,7 +657,6 @@ extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int, | |||
| 657 | extern ptrdiff_t lisp_string_width (Lisp_Object, ptrdiff_t, | 657 | extern ptrdiff_t lisp_string_width (Lisp_Object, ptrdiff_t, |
| 658 | ptrdiff_t *, ptrdiff_t *); | 658 | ptrdiff_t *, ptrdiff_t *); |
| 659 | 659 | ||
| 660 | extern Lisp_Object Qcharacterp; | ||
| 661 | extern Lisp_Object Vchar_unify_table; | 660 | extern Lisp_Object Vchar_unify_table; |
| 662 | extern Lisp_Object string_escape_byte8 (Lisp_Object); | 661 | extern Lisp_Object string_escape_byte8 (Lisp_Object); |
| 663 | 662 | ||
diff --git a/src/charset.c b/src/charset.c index 33436d53f63..ea1480e806a 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -66,16 +66,7 @@ struct charset *charset_table; | |||
| 66 | static ptrdiff_t charset_table_size; | 66 | static ptrdiff_t charset_table_size; |
| 67 | static int charset_table_used; | 67 | static int charset_table_used; |
| 68 | 68 | ||
| 69 | Lisp_Object Qcharsetp; | 69 | /* Special charsets corresponding to symbols. */ |
| 70 | |||
| 71 | /* Special charset symbols. */ | ||
| 72 | Lisp_Object Qascii; | ||
| 73 | static Lisp_Object Qeight_bit; | ||
| 74 | static Lisp_Object Qiso_8859_1; | ||
| 75 | static Lisp_Object Qunicode; | ||
| 76 | static Lisp_Object Qemacs; | ||
| 77 | |||
| 78 | /* The corresponding charsets. */ | ||
| 79 | int charset_ascii; | 70 | int charset_ascii; |
| 80 | int charset_eight_bit; | 71 | int charset_eight_bit; |
| 81 | static int charset_iso_8859_1; | 72 | static int charset_iso_8859_1; |
| @@ -88,9 +79,6 @@ int charset_jisx0208_1978; | |||
| 88 | int charset_jisx0208; | 79 | int charset_jisx0208; |
| 89 | int charset_ksc5601; | 80 | int charset_ksc5601; |
| 90 | 81 | ||
| 91 | /* Value of charset attribute `charset-iso-plane'. */ | ||
| 92 | static Lisp_Object Qgl, Qgr; | ||
| 93 | |||
| 94 | /* Charset of unibyte characters. */ | 82 | /* Charset of unibyte characters. */ |
| 95 | int charset_unibyte; | 83 | int charset_unibyte; |
| 96 | 84 | ||
| @@ -2344,12 +2332,14 @@ syms_of_charset (void) | |||
| 2344 | { | 2332 | { |
| 2345 | DEFSYM (Qcharsetp, "charsetp"); | 2333 | DEFSYM (Qcharsetp, "charsetp"); |
| 2346 | 2334 | ||
| 2335 | /* Special charset symbols. */ | ||
| 2347 | DEFSYM (Qascii, "ascii"); | 2336 | DEFSYM (Qascii, "ascii"); |
| 2348 | DEFSYM (Qunicode, "unicode"); | 2337 | DEFSYM (Qunicode, "unicode"); |
| 2349 | DEFSYM (Qemacs, "emacs"); | 2338 | DEFSYM (Qemacs, "emacs"); |
| 2350 | DEFSYM (Qeight_bit, "eight-bit"); | 2339 | DEFSYM (Qeight_bit, "eight-bit"); |
| 2351 | DEFSYM (Qiso_8859_1, "iso-8859-1"); | 2340 | DEFSYM (Qiso_8859_1, "iso-8859-1"); |
| 2352 | 2341 | ||
| 2342 | /* Value of charset attribute `charset-iso-plane'. */ | ||
| 2353 | DEFSYM (Qgl, "gl"); | 2343 | DEFSYM (Qgl, "gl"); |
| 2354 | DEFSYM (Qgr, "gr"); | 2344 | DEFSYM (Qgr, "gr"); |
| 2355 | 2345 | ||
| @@ -2362,10 +2352,6 @@ syms_of_charset (void) | |||
| 2362 | staticpro (&Vemacs_mule_charset_list); | 2352 | staticpro (&Vemacs_mule_charset_list); |
| 2363 | Vemacs_mule_charset_list = Qnil; | 2353 | Vemacs_mule_charset_list = Qnil; |
| 2364 | 2354 | ||
| 2365 | /* Don't staticpro them here. It's done in syms_of_fns. */ | ||
| 2366 | QCtest = intern_c_string (":test"); | ||
| 2367 | Qeq = intern_c_string ("eq"); | ||
| 2368 | |||
| 2369 | staticpro (&Vcharset_hash_table); | 2355 | staticpro (&Vcharset_hash_table); |
| 2370 | { | 2356 | { |
| 2371 | Lisp_Object args[2]; | 2357 | Lisp_Object args[2]; |
diff --git a/src/charset.h b/src/charset.h index f66ca0d9cb2..f6575985a47 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -519,9 +519,6 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | |||
| 519 | 519 | ||
| 520 | 520 | ||
| 521 | 521 | ||
| 522 | extern Lisp_Object Qcharsetp; | ||
| 523 | |||
| 524 | extern Lisp_Object Qascii; | ||
| 525 | extern int charset_ascii, charset_eight_bit; | 522 | extern int charset_ascii, charset_eight_bit; |
| 526 | extern int charset_unicode; | 523 | extern int charset_unicode; |
| 527 | extern int charset_jisx0201_roman; | 524 | extern int charset_jisx0201_roman; |
diff --git a/src/chartab.c b/src/chartab.c index bfbbf798f0c..013a5be575e 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -57,9 +57,6 @@ static const int chartab_bits[4] = | |||
| 57 | /* Preamble for uniprop (Unicode character property) tables. See the | 57 | /* Preamble for uniprop (Unicode character property) tables. See the |
| 58 | comment of "Unicode character property tables". */ | 58 | comment of "Unicode character property tables". */ |
| 59 | 59 | ||
| 60 | /* Purpose of uniprop tables. */ | ||
| 61 | static Lisp_Object Qchar_code_property_table; | ||
| 62 | |||
| 63 | /* Types of decoder and encoder functions for uniprop values. */ | 60 | /* Types of decoder and encoder functions for uniprop values. */ |
| 64 | typedef Lisp_Object (*uniprop_decoder_t) (Lisp_Object, Lisp_Object); | 61 | typedef Lisp_Object (*uniprop_decoder_t) (Lisp_Object, Lisp_Object); |
| 65 | typedef Lisp_Object (*uniprop_encoder_t) (Lisp_Object, Lisp_Object); | 62 | typedef Lisp_Object (*uniprop_encoder_t) (Lisp_Object, Lisp_Object); |
| @@ -1378,6 +1375,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */) | |||
| 1378 | void | 1375 | void |
| 1379 | syms_of_chartab (void) | 1376 | syms_of_chartab (void) |
| 1380 | { | 1377 | { |
| 1378 | /* Purpose of uniprop tables. */ | ||
| 1381 | DEFSYM (Qchar_code_property_table, "char-code-property-table"); | 1379 | DEFSYM (Qchar_code_property_table, "char-code-property-table"); |
| 1382 | 1380 | ||
| 1383 | defsubr (&Smake_char_table); | 1381 | defsubr (&Smake_char_table); |
diff --git a/src/cmds.c b/src/cmds.c index 485a235b5ab..270fc39cabc 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -31,11 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include "dispextern.h" | 31 | #include "dispextern.h" |
| 32 | #include "frame.h" | 32 | #include "frame.h" |
| 33 | 33 | ||
| 34 | static Lisp_Object Qkill_forward_chars, Qkill_backward_chars; | ||
| 35 | |||
| 36 | /* A possible value for a buffer's overwrite-mode variable. */ | ||
| 37 | static Lisp_Object Qoverwrite_mode_binary; | ||
| 38 | |||
| 39 | static int internal_self_insert (int, EMACS_INT); | 34 | static int internal_self_insert (int, EMACS_INT); |
| 40 | 35 | ||
| 41 | DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, | 36 | DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, |
| @@ -322,9 +317,6 @@ At the end, it runs `post-self-insert-hook'. */) | |||
| 322 | return 0. A value of 1 indicates this *might* not have been simple. | 317 | return 0. A value of 1 indicates this *might* not have been simple. |
| 323 | A value of 2 means this did things that call for an undo boundary. */ | 318 | A value of 2 means this did things that call for an undo boundary. */ |
| 324 | 319 | ||
| 325 | static Lisp_Object Qexpand_abbrev; | ||
| 326 | static Lisp_Object Qpost_self_insert_hook; | ||
| 327 | |||
| 328 | static int | 320 | static int |
| 329 | internal_self_insert (int c, EMACS_INT n) | 321 | internal_self_insert (int c, EMACS_INT n) |
| 330 | { | 322 | { |
| @@ -507,7 +499,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 507 | } | 499 | } |
| 508 | 500 | ||
| 509 | /* Run hooks for electric keys. */ | 501 | /* Run hooks for electric keys. */ |
| 510 | Frun_hooks (1, &Qpost_self_insert_hook); | 502 | run_hook (Qpost_self_insert_hook); |
| 511 | 503 | ||
| 512 | return hairy; | 504 | return hairy; |
| 513 | } | 505 | } |
| @@ -519,7 +511,10 @@ syms_of_cmds (void) | |||
| 519 | { | 511 | { |
| 520 | DEFSYM (Qkill_backward_chars, "kill-backward-chars"); | 512 | DEFSYM (Qkill_backward_chars, "kill-backward-chars"); |
| 521 | DEFSYM (Qkill_forward_chars, "kill-forward-chars"); | 513 | DEFSYM (Qkill_forward_chars, "kill-forward-chars"); |
| 514 | |||
| 515 | /* A possible value for a buffer's overwrite-mode variable. */ | ||
| 522 | DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary"); | 516 | DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary"); |
| 517 | |||
| 523 | DEFSYM (Qexpand_abbrev, "expand-abbrev"); | 518 | DEFSYM (Qexpand_abbrev, "expand-abbrev"); |
| 524 | DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook"); | 519 | DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook"); |
| 525 | 520 | ||
diff --git a/src/coding.c b/src/coding.c index f3f8dc18875..20c64762160 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -303,35 +303,6 @@ encode_coding_XXX (struct coding_system *coding) | |||
| 303 | 303 | ||
| 304 | Lisp_Object Vcoding_system_hash_table; | 304 | Lisp_Object Vcoding_system_hash_table; |
| 305 | 305 | ||
| 306 | static Lisp_Object Qcoding_system, Qeol_type; | ||
| 307 | static Lisp_Object Qcoding_aliases; | ||
| 308 | Lisp_Object Qunix, Qdos; | ||
| 309 | static Lisp_Object Qmac; | ||
| 310 | Lisp_Object Qbuffer_file_coding_system; | ||
| 311 | static Lisp_Object Qpost_read_conversion, Qpre_write_conversion; | ||
| 312 | static Lisp_Object Qdefault_char; | ||
| 313 | Lisp_Object Qno_conversion, Qundecided; | ||
| 314 | Lisp_Object Qcharset, Qutf_8; | ||
| 315 | static Lisp_Object Qiso_2022; | ||
| 316 | static Lisp_Object Qutf_16, Qshift_jis, Qbig5; | ||
| 317 | static Lisp_Object Qbig, Qlittle; | ||
| 318 | static Lisp_Object Qcoding_system_history; | ||
| 319 | static Lisp_Object Qvalid_codes; | ||
| 320 | static Lisp_Object QCcategory, QCmnemonic, QCdefault_char; | ||
| 321 | static Lisp_Object QCdecode_translation_table, QCencode_translation_table; | ||
| 322 | static Lisp_Object QCpost_read_conversion, QCpre_write_conversion; | ||
| 323 | static Lisp_Object QCascii_compatible_p; | ||
| 324 | |||
| 325 | Lisp_Object Qcall_process, Qcall_process_region; | ||
| 326 | Lisp_Object Qstart_process, Qopen_network_stream; | ||
| 327 | static Lisp_Object Qtarget_idx; | ||
| 328 | |||
| 329 | static Lisp_Object Qinsufficient_source, Qinvalid_source, Qinterrupted; | ||
| 330 | |||
| 331 | /* If a symbol has this property, evaluate the value to define the | ||
| 332 | symbol as a coding system. */ | ||
| 333 | static Lisp_Object Qcoding_system_define_form; | ||
| 334 | |||
| 335 | /* Format of end-of-line decided by system. This is Qunix on | 306 | /* Format of end-of-line decided by system. This is Qunix on |
| 336 | Unix and Mac, Qdos on DOS/Windows. | 307 | Unix and Mac, Qdos on DOS/Windows. |
| 337 | This has an effect only for external encoding (i.e. for output to | 308 | This has an effect only for external encoding (i.e. for output to |
| @@ -340,17 +311,6 @@ static Lisp_Object system_eol_type; | |||
| 340 | 311 | ||
| 341 | #ifdef emacs | 312 | #ifdef emacs |
| 342 | 313 | ||
| 343 | Lisp_Object Qcoding_system_p, Qcoding_system_error; | ||
| 344 | |||
| 345 | /* Coding system emacs-mule and raw-text are for converting only | ||
| 346 | end-of-line format. */ | ||
| 347 | Lisp_Object Qemacs_mule, Qraw_text; | ||
| 348 | Lisp_Object Qutf_8_emacs; | ||
| 349 | |||
| 350 | #if defined (WINDOWSNT) || defined (CYGWIN) | ||
| 351 | static Lisp_Object Qutf_16le; | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /* Coding-systems are handed between Emacs Lisp programs and C internal | 314 | /* Coding-systems are handed between Emacs Lisp programs and C internal |
| 355 | routines by the following three variables. */ | 315 | routines by the following three variables. */ |
| 356 | /* Coding system to be used to encode text for terminal display when | 316 | /* Coding system to be used to encode text for terminal display when |
| @@ -359,11 +319,6 @@ struct coding_system safe_terminal_coding; | |||
| 359 | 319 | ||
| 360 | #endif /* emacs */ | 320 | #endif /* emacs */ |
| 361 | 321 | ||
| 362 | Lisp_Object Qtranslation_table; | ||
| 363 | Lisp_Object Qtranslation_table_id; | ||
| 364 | static Lisp_Object Qtranslation_table_for_decode; | ||
| 365 | static Lisp_Object Qtranslation_table_for_encode; | ||
| 366 | |||
| 367 | /* Two special coding systems. */ | 322 | /* Two special coding systems. */ |
| 368 | static Lisp_Object Vsjis_coding_system; | 323 | static Lisp_Object Vsjis_coding_system; |
| 369 | static Lisp_Object Vbig5_coding_system; | 324 | static Lisp_Object Vbig5_coding_system; |
| @@ -10903,6 +10858,7 @@ syms_of_coding (void) | |||
| 10903 | 10858 | ||
| 10904 | DEFSYM (Qcoding_system_p, "coding-system-p"); | 10859 | DEFSYM (Qcoding_system_p, "coding-system-p"); |
| 10905 | 10860 | ||
| 10861 | /* Error signaled when there's a problem with detecting a coding system. */ | ||
| 10906 | DEFSYM (Qcoding_system_error, "coding-system-error"); | 10862 | DEFSYM (Qcoding_system_error, "coding-system-error"); |
| 10907 | Fput (Qcoding_system_error, Qerror_conditions, | 10863 | Fput (Qcoding_system_error, Qerror_conditions, |
| 10908 | listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror)); | 10864 | listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror)); |
| @@ -10917,6 +10873,8 @@ syms_of_coding (void) | |||
| 10917 | 10873 | ||
| 10918 | DEFSYM (Qvalid_codes, "valid-codes"); | 10874 | DEFSYM (Qvalid_codes, "valid-codes"); |
| 10919 | 10875 | ||
| 10876 | /* Coding system emacs-mule and raw-text are for converting only | ||
| 10877 | end-of-line format. */ | ||
| 10920 | DEFSYM (Qemacs_mule, "emacs-mule"); | 10878 | DEFSYM (Qemacs_mule, "emacs-mule"); |
| 10921 | 10879 | ||
| 10922 | DEFSYM (QCcategory, ":category"); | 10880 | DEFSYM (QCcategory, ":category"); |
| @@ -10979,6 +10937,9 @@ syms_of_coding (void) | |||
| 10979 | DEFSYM (Qinsufficient_source, "insufficient-source"); | 10937 | DEFSYM (Qinsufficient_source, "insufficient-source"); |
| 10980 | DEFSYM (Qinvalid_source, "invalid-source"); | 10938 | DEFSYM (Qinvalid_source, "invalid-source"); |
| 10981 | DEFSYM (Qinterrupted, "interrupted"); | 10939 | DEFSYM (Qinterrupted, "interrupted"); |
| 10940 | |||
| 10941 | /* If a symbol has this property, evaluate the value to define the | ||
| 10942 | symbol as a coding system. */ | ||
| 10982 | DEFSYM (Qcoding_system_define_form, "coding-system-define-form"); | 10943 | DEFSYM (Qcoding_system_define_form, "coding-system-define-form"); |
| 10983 | 10944 | ||
| 10984 | defsubr (&Scoding_system_p); | 10945 | defsubr (&Scoding_system_p); |
diff --git a/src/coding.h b/src/coding.h index 2b56e5abd9d..d49d786e6dd 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -763,23 +763,7 @@ extern Lisp_Object from_unicode_buffer (const wchar_t *wstr); | |||
| 763 | extern Lisp_Object preferred_coding_system (void); | 763 | extern Lisp_Object preferred_coding_system (void); |
| 764 | 764 | ||
| 765 | 765 | ||
| 766 | extern Lisp_Object Qutf_8, Qutf_8_emacs; | ||
| 767 | |||
| 768 | extern Lisp_Object Qcoding_category_index; | ||
| 769 | extern Lisp_Object Qcoding_system_p; | ||
| 770 | extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided; | ||
| 771 | extern Lisp_Object Qbuffer_file_coding_system; | ||
| 772 | |||
| 773 | extern Lisp_Object Qunix, Qdos; | ||
| 774 | |||
| 775 | extern Lisp_Object Qtranslation_table; | ||
| 776 | extern Lisp_Object Qtranslation_table_id; | ||
| 777 | |||
| 778 | #ifdef emacs | 766 | #ifdef emacs |
| 779 | extern Lisp_Object Qfile_coding_system; | ||
| 780 | extern Lisp_Object Qcall_process, Qcall_process_region; | ||
| 781 | extern Lisp_Object Qstart_process, Qopen_network_stream; | ||
| 782 | extern Lisp_Object Qwrite_region; | ||
| 783 | 767 | ||
| 784 | extern char *emacs_strerror (int); | 768 | extern char *emacs_strerror (int); |
| 785 | 769 | ||
| @@ -789,9 +773,6 @@ extern struct coding_system safe_terminal_coding; | |||
| 789 | 773 | ||
| 790 | #endif | 774 | #endif |
| 791 | 775 | ||
| 792 | /* Error signaled when there's a problem with detecting coding system */ | ||
| 793 | extern Lisp_Object Qcoding_system_error; | ||
| 794 | |||
| 795 | extern char emacs_mule_bytes[256]; | 776 | extern char emacs_mule_bytes[256]; |
| 796 | 777 | ||
| 797 | #endif /* EMACS_CODING_H */ | 778 | #endif /* EMACS_CODING_H */ |
diff --git a/src/composite.c b/src/composite.c index 4b22499fdd9..8ac5ef712c6 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -134,8 +134,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 134 | */ | 134 | */ |
| 135 | 135 | ||
| 136 | 136 | ||
| 137 | Lisp_Object Qcomposition; | ||
| 138 | |||
| 139 | /* Table of pointers to the structure `composition' indexed by | 137 | /* Table of pointers to the structure `composition' indexed by |
| 140 | COMPOSITION-ID. This structure is for storing information about | 138 | COMPOSITION-ID. This structure is for storing information about |
| 141 | each composition except for COMPONENTS-VEC. */ | 139 | each composition except for COMPONENTS-VEC. */ |
| @@ -152,8 +150,6 @@ ptrdiff_t n_compositions; | |||
| 152 | COMPOSITION-ID. */ | 150 | COMPOSITION-ID. */ |
| 153 | Lisp_Object composition_hash_table; | 151 | Lisp_Object composition_hash_table; |
| 154 | 152 | ||
| 155 | static Lisp_Object Qauto_composed; | ||
| 156 | static Lisp_Object Qauto_composition_function; | ||
| 157 | /* Maximum number of characters to look back for | 153 | /* Maximum number of characters to look back for |
| 158 | auto-compositions. */ | 154 | auto-compositions. */ |
| 159 | #define MAX_AUTO_COMPOSITION_LOOKBACK 3 | 155 | #define MAX_AUTO_COMPOSITION_LOOKBACK 3 |
diff --git a/src/composite.h b/src/composite.h index e0d4e858d48..fb9f9eb8655 100644 --- a/src/composite.h +++ b/src/composite.h | |||
| @@ -190,7 +190,6 @@ extern ptrdiff_t n_compositions; | |||
| 190 | #define CHECK_BORDER (CHECK_HEAD | CHECK_TAIL) | 190 | #define CHECK_BORDER (CHECK_HEAD | CHECK_TAIL) |
| 191 | #define CHECK_ALL (CHECK_BORDER | CHECK_INSIDE) | 191 | #define CHECK_ALL (CHECK_BORDER | CHECK_INSIDE) |
| 192 | 192 | ||
| 193 | extern Lisp_Object Qcomposition; | ||
| 194 | extern Lisp_Object composition_hash_table; | 193 | extern Lisp_Object composition_hash_table; |
| 195 | extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t, | 194 | extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t, |
| 196 | Lisp_Object, Lisp_Object); | 195 | Lisp_Object, Lisp_Object); |
diff --git a/src/conf_post.h b/src/conf_post.h index 479d0448775..1a080fad635 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -245,7 +245,9 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 245 | # define ATTRIBUTE_MALLOC | 245 | # define ATTRIBUTE_MALLOC |
| 246 | #endif | 246 | #endif |
| 247 | 247 | ||
| 248 | #if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) | 248 | #if (__clang__ \ |
| 249 | ? __has_attribute (alloc_size) \ | ||
| 250 | : 4 < __GNUC__ + (3 <= __GNUC_MINOR__)) | ||
| 249 | # define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) | 251 | # define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) |
| 250 | #else | 252 | #else |
| 251 | # define ATTRIBUTE_ALLOC_SIZE(args) | 253 | # define ATTRIBUTE_ALLOC_SIZE(args) |
diff --git a/src/data.c b/src/data.c index 3992792fdd0..820c3ce8407 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -37,58 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | #include "font.h" | 37 | #include "font.h" |
| 38 | #include "keymap.h" | 38 | #include "keymap.h" |
| 39 | 39 | ||
| 40 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; | ||
| 41 | static Lisp_Object Qsubr; | ||
| 42 | Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; | ||
| 43 | Lisp_Object Qerror, Quser_error, Qquit, Qargs_out_of_range; | ||
| 44 | static Lisp_Object Qwrong_length_argument; | ||
| 45 | static Lisp_Object Qwrong_type_argument; | ||
| 46 | Lisp_Object Qvoid_variable, Qvoid_function; | ||
| 47 | static Lisp_Object Qcyclic_function_indirection; | ||
| 48 | static Lisp_Object Qcyclic_variable_indirection; | ||
| 49 | Lisp_Object Qcircular_list; | ||
| 50 | static Lisp_Object Qsetting_constant; | ||
| 51 | Lisp_Object Qinvalid_read_syntax; | ||
| 52 | Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; | ||
| 53 | Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; | ||
| 54 | Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; | ||
| 55 | Lisp_Object Qtext_read_only; | ||
| 56 | |||
| 57 | Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp; | ||
| 58 | static Lisp_Object Qnatnump; | ||
| 59 | Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; | ||
| 60 | Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; | ||
| 61 | Lisp_Object Qbool_vector_p; | ||
| 62 | Lisp_Object Qbuffer_or_string_p; | ||
| 63 | static Lisp_Object Qkeywordp, Qboundp; | ||
| 64 | Lisp_Object Qfboundp; | ||
| 65 | Lisp_Object Qchar_table_p, Qvector_or_char_table_p; | ||
| 66 | |||
| 67 | Lisp_Object Qcdr; | ||
| 68 | static Lisp_Object Qad_advice_info, Qad_activate_internal; | ||
| 69 | |||
| 70 | static Lisp_Object Qdomain_error, Qsingularity_error, Qunderflow_error; | ||
| 71 | Lisp_Object Qrange_error, Qoverflow_error; | ||
| 72 | |||
| 73 | Lisp_Object Qfloatp; | ||
| 74 | Lisp_Object Qnumberp, Qnumber_or_marker_p; | ||
| 75 | |||
| 76 | Lisp_Object Qinteger, Qsymbol; | ||
| 77 | static Lisp_Object Qcons, Qfloat, Qmisc, Qstring, Qvector; | ||
| 78 | Lisp_Object Qwindow; | ||
| 79 | static Lisp_Object Qoverlay, Qwindow_configuration; | ||
| 80 | static Lisp_Object Qprocess, Qmarker; | ||
| 81 | static Lisp_Object Qcompiled_function, Qframe; | ||
| 82 | Lisp_Object Qbuffer; | ||
| 83 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | ||
| 84 | static Lisp_Object Qsubrp; | ||
| 85 | static Lisp_Object Qmany, Qunevalled; | ||
| 86 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | ||
| 87 | static Lisp_Object Qdefun; | ||
| 88 | |||
| 89 | Lisp_Object Qinteractive_form; | ||
| 90 | static Lisp_Object Qdefalias_fset_function; | ||
| 91 | |||
| 92 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, | 40 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, |
| 93 | struct Lisp_Buffer_Local_Value *); | 41 | struct Lisp_Buffer_Local_Value *); |
| 94 | 42 | ||
| @@ -3584,10 +3532,6 @@ syms_of_data (void) | |||
| 3584 | PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail), | 3532 | PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail), |
| 3585 | "Arithmetic underflow error"); | 3533 | "Arithmetic underflow error"); |
| 3586 | 3534 | ||
| 3587 | staticpro (&Qnil); | ||
| 3588 | staticpro (&Qt); | ||
| 3589 | staticpro (&Qunbound); | ||
| 3590 | |||
| 3591 | /* Types that type-of returns. */ | 3535 | /* Types that type-of returns. */ |
| 3592 | DEFSYM (Qinteger, "integer"); | 3536 | DEFSYM (Qinteger, "integer"); |
| 3593 | DEFSYM (Qsymbol, "symbol"); | 3537 | DEFSYM (Qsymbol, "symbol"); |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 9de694954d4..3bdec0fa4a6 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -41,37 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | /* Subroutines. */ | ||
| 45 | static Lisp_Object Qdbus__init_bus; | ||
| 46 | static Lisp_Object Qdbus_get_unique_name; | ||
| 47 | static Lisp_Object Qdbus_message_internal; | ||
| 48 | |||
| 49 | /* D-Bus error symbol. */ | ||
| 50 | static Lisp_Object Qdbus_error; | ||
| 51 | |||
| 52 | /* Lisp symbols of the system and session buses. */ | ||
| 53 | static Lisp_Object QCdbus_system_bus, QCdbus_session_bus; | ||
| 54 | |||
| 55 | /* Lisp symbol for method call timeout. */ | ||
| 56 | static Lisp_Object QCdbus_timeout; | ||
| 57 | |||
| 58 | /* Lisp symbols of D-Bus types. */ | ||
| 59 | static Lisp_Object QCdbus_type_byte, QCdbus_type_boolean; | ||
| 60 | static Lisp_Object QCdbus_type_int16, QCdbus_type_uint16; | ||
| 61 | static Lisp_Object QCdbus_type_int32, QCdbus_type_uint32; | ||
| 62 | static Lisp_Object QCdbus_type_int64, QCdbus_type_uint64; | ||
| 63 | static Lisp_Object QCdbus_type_double, QCdbus_type_string; | ||
| 64 | static Lisp_Object QCdbus_type_object_path, QCdbus_type_signature; | ||
| 65 | #ifdef DBUS_TYPE_UNIX_FD | ||
| 66 | static Lisp_Object QCdbus_type_unix_fd; | ||
| 67 | #endif | ||
| 68 | static Lisp_Object QCdbus_type_array, QCdbus_type_variant; | ||
| 69 | static Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; | ||
| 70 | |||
| 71 | /* Lisp symbols of objects in `dbus-registered-objects-table'. */ | ||
| 72 | static Lisp_Object QCdbus_registered_serial, QCdbus_registered_method; | ||
| 73 | static Lisp_Object QCdbus_registered_signal; | ||
| 74 | |||
| 75 | /* Alist of D-Bus buses we are polling for messages. | 44 | /* Alist of D-Bus buses we are polling for messages. |
| 76 | The key is the symbol or string of the bus, and the value is the | 45 | The key is the symbol or string of the bus, and the value is the |
| 77 | connection address. */ | 46 | connection address. */ |
| @@ -1755,15 +1724,21 @@ syms_of_dbusbind (void) | |||
| 1755 | DEFSYM (Qdbus_message_internal, "dbus-message-internal"); | 1724 | DEFSYM (Qdbus_message_internal, "dbus-message-internal"); |
| 1756 | defsubr (&Sdbus_message_internal); | 1725 | defsubr (&Sdbus_message_internal); |
| 1757 | 1726 | ||
| 1727 | /* D-Bus error symbol. */ | ||
| 1758 | DEFSYM (Qdbus_error, "dbus-error"); | 1728 | DEFSYM (Qdbus_error, "dbus-error"); |
| 1759 | Fput (Qdbus_error, Qerror_conditions, | 1729 | Fput (Qdbus_error, Qerror_conditions, |
| 1760 | list2 (Qdbus_error, Qerror)); | 1730 | list2 (Qdbus_error, Qerror)); |
| 1761 | Fput (Qdbus_error, Qerror_message, | 1731 | Fput (Qdbus_error, Qerror_message, |
| 1762 | build_pure_c_string ("D-Bus error")); | 1732 | build_pure_c_string ("D-Bus error")); |
| 1763 | 1733 | ||
| 1734 | /* Lisp symbols of the system and session buses. */ | ||
| 1764 | DEFSYM (QCdbus_system_bus, ":system"); | 1735 | DEFSYM (QCdbus_system_bus, ":system"); |
| 1765 | DEFSYM (QCdbus_session_bus, ":session"); | 1736 | DEFSYM (QCdbus_session_bus, ":session"); |
| 1737 | |||
| 1738 | /* Lisp symbol for method call timeout. */ | ||
| 1766 | DEFSYM (QCdbus_timeout, ":timeout"); | 1739 | DEFSYM (QCdbus_timeout, ":timeout"); |
| 1740 | |||
| 1741 | /* Lisp symbols of D-Bus types. */ | ||
| 1767 | DEFSYM (QCdbus_type_byte, ":byte"); | 1742 | DEFSYM (QCdbus_type_byte, ":byte"); |
| 1768 | DEFSYM (QCdbus_type_boolean, ":boolean"); | 1743 | DEFSYM (QCdbus_type_boolean, ":boolean"); |
| 1769 | DEFSYM (QCdbus_type_int16, ":int16"); | 1744 | DEFSYM (QCdbus_type_int16, ":int16"); |
| @@ -1783,6 +1758,8 @@ syms_of_dbusbind (void) | |||
| 1783 | DEFSYM (QCdbus_type_variant, ":variant"); | 1758 | DEFSYM (QCdbus_type_variant, ":variant"); |
| 1784 | DEFSYM (QCdbus_type_struct, ":struct"); | 1759 | DEFSYM (QCdbus_type_struct, ":struct"); |
| 1785 | DEFSYM (QCdbus_type_dict_entry, ":dict-entry"); | 1760 | DEFSYM (QCdbus_type_dict_entry, ":dict-entry"); |
| 1761 | |||
| 1762 | /* Lisp symbols of objects in `dbus-registered-objects-table'. */ | ||
| 1786 | DEFSYM (QCdbus_registered_serial, ":serial"); | 1763 | DEFSYM (QCdbus_registered_serial, ":serial"); |
| 1787 | DEFSYM (QCdbus_registered_method, ":method"); | 1764 | DEFSYM (QCdbus_registered_method, ":method"); |
| 1788 | DEFSYM (QCdbus_registered_signal, ":signal"); | 1765 | DEFSYM (QCdbus_registered_signal, ":signal"); |
diff --git a/src/decompress.c b/src/decompress.c index 3c0ef10cea5..b14f0a2cd79 100644 --- a/src/decompress.c +++ b/src/decompress.c | |||
| @@ -28,8 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | 28 | ||
| 29 | #include <verify.h> | 29 | #include <verify.h> |
| 30 | 30 | ||
| 31 | static Lisp_Object Qzlib_dll; | ||
| 32 | |||
| 33 | #ifdef WINDOWSNT | 31 | #ifdef WINDOWSNT |
| 34 | # include <windows.h> | 32 | # include <windows.h> |
| 35 | # include "w32.h" | 33 | # include "w32.h" |
diff --git a/src/dired.c b/src/dired.c index 3ca400eafe9..00f9a5b0765 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -51,13 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 51 | #include "msdos.h" /* for fstatat */ | 51 | #include "msdos.h" /* for fstatat */ |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | static Lisp_Object Qdirectory_files; | ||
| 55 | static Lisp_Object Qdirectory_files_and_attributes; | ||
| 56 | static Lisp_Object Qfile_name_completion; | ||
| 57 | static Lisp_Object Qfile_name_all_completions; | ||
| 58 | static Lisp_Object Qfile_attributes; | ||
| 59 | static Lisp_Object Qfile_attributes_lessp; | ||
| 60 | |||
| 61 | static ptrdiff_t scmp (const char *, const char *, ptrdiff_t); | 54 | static ptrdiff_t scmp (const char *, const char *, ptrdiff_t); |
| 62 | static Lisp_Object file_attributes (int, char const *, Lisp_Object); | 55 | static Lisp_Object file_attributes (int, char const *, Lisp_Object); |
| 63 | 56 | ||
| @@ -450,7 +443,6 @@ These are all file names in directory DIRECTORY which begin with FILE. */) | |||
| 450 | } | 443 | } |
| 451 | 444 | ||
| 452 | static int file_name_completion_stat (int, struct dirent *, struct stat *); | 445 | static int file_name_completion_stat (int, struct dirent *, struct stat *); |
| 453 | static Lisp_Object Qdefault_directory; | ||
| 454 | 446 | ||
| 455 | static Lisp_Object | 447 | static Lisp_Object |
| 456 | file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, | 448 | file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, |
diff --git a/src/dispextern.h b/src/dispextern.h index 10c84da2486..bf0c2fc0a47 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -393,10 +393,9 @@ struct glyph | |||
| 393 | 393 | ||
| 394 | /* Lisp object source of this glyph. Currently either a buffer or a | 394 | /* Lisp object source of this glyph. Currently either a buffer or a |
| 395 | string, if the glyph was produced from characters which came from | 395 | string, if the glyph was produced from characters which came from |
| 396 | a buffer or a string; or Lisp integer zero (a.k.a. "null object") | 396 | a buffer or a string; or nil if the glyph was inserted by |
| 397 | if the glyph was inserted by redisplay for its own purposes, such | 397 | redisplay for its own purposes, such as padding, truncation, or |
| 398 | as padding or truncation/continuation glyphs, or the | 398 | continuation glyphs, or the overlay-arrow glyphs on TTYs. */ |
| 399 | overlay-arrow glyphs on TTYs. */ | ||
| 400 | Lisp_Object object; | 399 | Lisp_Object object; |
| 401 | 400 | ||
| 402 | /* Width in pixels. */ | 401 | /* Width in pixels. */ |
| @@ -1727,8 +1726,8 @@ struct face | |||
| 1727 | attributes except the font. */ | 1726 | attributes except the font. */ |
| 1728 | struct face *ascii_face; | 1727 | struct face *ascii_face; |
| 1729 | 1728 | ||
| 1730 | #ifdef HAVE_XFT | 1729 | #if defined HAVE_XFT || defined HAVE_FREETYPE |
| 1731 | /* Extra member that a font-driver uses privately. */ | 1730 | /* Extra member that a font-driver uses privately. */ |
| 1732 | void *extra; | 1731 | void *extra; |
| 1733 | #endif | 1732 | #endif |
| 1734 | }; | 1733 | }; |
| @@ -2552,11 +2551,11 @@ struct it | |||
| 2552 | Object is normally the buffer which is being rendered, but it can | 2551 | Object is normally the buffer which is being rendered, but it can |
| 2553 | also be a Lisp string in case the current display element comes | 2552 | also be a Lisp string in case the current display element comes |
| 2554 | from an overlay string or from a display string (before- or | 2553 | from an overlay string or from a display string (before- or |
| 2555 | after-string). It may also be nil when a C string is being | 2554 | after-string). It may also be a zero-valued Lisp integer when a |
| 2556 | rendered, e.g., during mode-line or header-line update. It can | 2555 | C string is being rendered, e.g., during mode-line or header-line |
| 2557 | also be a cons cell of the form `(space ...)', when we produce a | 2556 | update. It can also be a cons cell of the form `(space ...)', |
| 2558 | stretch glyph from a `display' specification. Finally, it can be | 2557 | when we produce a stretch glyph from a `display' specification. |
| 2559 | a zero-valued Lisp integer, but only temporarily, when we are | 2558 | Finally, it can be nil, but only temporarily, when we are |
| 2560 | producing special glyphs for display purposes, like truncation | 2559 | producing special glyphs for display purposes, like truncation |
| 2561 | and continuation glyphs, or blanks that extend each line to the | 2560 | and continuation glyphs, or blanks that extend each line to the |
| 2562 | edge of the window on a TTY. | 2561 | edge of the window on a TTY. |
| @@ -2934,8 +2933,8 @@ struct redisplay_interface | |||
| 2934 | 2933 | ||
| 2935 | struct image_type | 2934 | struct image_type |
| 2936 | { | 2935 | { |
| 2937 | /* A symbol uniquely identifying the image type, .e.g `jpeg'. */ | 2936 | /* Index of a symbol uniquely identifying the image type, e.g., 'jpeg'. */ |
| 2938 | Lisp_Object *type; | 2937 | int type; |
| 2939 | 2938 | ||
| 2940 | /* Check that SPEC is a valid image specification for the given | 2939 | /* Check that SPEC is a valid image specification for the given |
| 2941 | image type. Value is true if SPEC is valid. */ | 2940 | image type. Value is true if SPEC is valid. */ |
| @@ -3249,7 +3248,6 @@ void move_it_in_display_line (struct it *it, | |||
| 3249 | enum move_operation_enum op); | 3248 | enum move_operation_enum op); |
| 3250 | bool in_display_vector_p (struct it *); | 3249 | bool in_display_vector_p (struct it *); |
| 3251 | int frame_mode_line_height (struct frame *); | 3250 | int frame_mode_line_height (struct frame *); |
| 3252 | extern Lisp_Object Qtool_bar; | ||
| 3253 | extern bool redisplaying_p; | 3251 | extern bool redisplaying_p; |
| 3254 | extern bool help_echo_showing_p; | 3252 | extern bool help_echo_showing_p; |
| 3255 | extern Lisp_Object help_echo_string, help_echo_window; | 3253 | extern Lisp_Object help_echo_string, help_echo_window; |
| @@ -3429,7 +3427,6 @@ int face_at_string_position (struct window *w, Lisp_Object string, | |||
| 3429 | int merge_faces (struct frame *, Lisp_Object, int, int); | 3427 | int merge_faces (struct frame *, Lisp_Object, int, int); |
| 3430 | int compute_char_face (struct frame *, int, Lisp_Object); | 3428 | int compute_char_face (struct frame *, int, Lisp_Object); |
| 3431 | void free_all_realized_faces (Lisp_Object); | 3429 | void free_all_realized_faces (Lisp_Object); |
| 3432 | extern Lisp_Object Qforeground_color, Qbackground_color; | ||
| 3433 | extern char unspecified_fg[], unspecified_bg[]; | 3430 | extern char unspecified_fg[], unspecified_bg[]; |
| 3434 | 3431 | ||
| 3435 | /* Defined in xfns.c. */ | 3432 | /* Defined in xfns.c. */ |
| @@ -3519,7 +3516,6 @@ void do_pending_window_change (bool); | |||
| 3519 | void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); | 3516 | void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); |
| 3520 | void init_display (void); | 3517 | void init_display (void); |
| 3521 | void syms_of_display (void); | 3518 | void syms_of_display (void); |
| 3522 | extern Lisp_Object Qredisplay_dont_pause; | ||
| 3523 | extern void spec_glyph_lookup_face (struct window *, GLYPH *); | 3519 | extern void spec_glyph_lookup_face (struct window *, GLYPH *); |
| 3524 | extern void fill_up_frame_row_with_spaces (struct glyph_row *, int); | 3520 | extern void fill_up_frame_row_with_spaces (struct glyph_row *, int); |
| 3525 | 3521 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 6e0fcc3f69b..bb75973edb8 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -106,8 +106,6 @@ static void set_window_update_flags (struct window *w, bool on_p); | |||
| 106 | 106 | ||
| 107 | bool display_completed; | 107 | bool display_completed; |
| 108 | 108 | ||
| 109 | Lisp_Object Qdisplay_table, Qredisplay_dont_pause; | ||
| 110 | |||
| 111 | /* True means SIGWINCH happened when not safe. */ | 109 | /* True means SIGWINCH happened when not safe. */ |
| 112 | 110 | ||
| 113 | static bool delayed_size_change; | 111 | static bool delayed_size_change; |
| @@ -5177,7 +5175,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5177 | 5175 | ||
| 5178 | Fset_buffer (old_current_buffer); | 5176 | Fset_buffer (old_current_buffer); |
| 5179 | 5177 | ||
| 5180 | *dx = x0 + it.first_visible_x - it.current_x; | 5178 | *dx = to_x - it.current_x; |
| 5181 | *dy = *y - it.current_y; | 5179 | *dy = *y - it.current_y; |
| 5182 | 5180 | ||
| 5183 | string = w->contents; | 5181 | string = w->contents; |
| @@ -5252,9 +5250,9 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5252 | } | 5250 | } |
| 5253 | 5251 | ||
| 5254 | /* Add extra (default width) columns if clicked after EOL. */ | 5252 | /* Add extra (default width) columns if clicked after EOL. */ |
| 5255 | x1 = max (0, it.current_x + it.pixel_width - it.first_visible_x); | 5253 | x1 = max (0, it.current_x + it.pixel_width); |
| 5256 | if (x0 > x1) | 5254 | if (to_x > x1) |
| 5257 | it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); | 5255 | it.hpos += (to_x - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); |
| 5258 | 5256 | ||
| 5259 | *x = it.hpos; | 5257 | *x = it.hpos; |
| 5260 | *y = it.vpos; | 5258 | *y = it.vpos; |
| @@ -6204,7 +6202,9 @@ syms_of_display (void) | |||
| 6204 | frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda); | 6202 | frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda); |
| 6205 | staticpro (&frame_and_buffer_state); | 6203 | staticpro (&frame_and_buffer_state); |
| 6206 | 6204 | ||
| 6205 | /* This is the "purpose" slot of a display table. */ | ||
| 6207 | DEFSYM (Qdisplay_table, "display-table"); | 6206 | DEFSYM (Qdisplay_table, "display-table"); |
| 6207 | |||
| 6208 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); | 6208 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); |
| 6209 | 6209 | ||
| 6210 | DEFVAR_INT ("baud-rate", baud_rate, | 6210 | DEFVAR_INT ("baud-rate", baud_rate, |
diff --git a/src/disptab.h b/src/disptab.h index cea040fe8aa..7afc862312a 100644 --- a/src/disptab.h +++ b/src/disptab.h | |||
| @@ -48,9 +48,6 @@ extern struct Lisp_Char_Table *window_display_table (struct window *); | |||
| 48 | /* Defined in indent.c. */ | 48 | /* Defined in indent.c. */ |
| 49 | extern struct Lisp_Char_Table *buffer_display_table (void); | 49 | extern struct Lisp_Char_Table *buffer_display_table (void); |
| 50 | 50 | ||
| 51 | /* This is the `purpose' slot of a display table. */ | ||
| 52 | extern Lisp_Object Qdisplay_table; | ||
| 53 | |||
| 54 | /* Return the current length of the GLYPH table, | 51 | /* Return the current length of the GLYPH table, |
| 55 | or 0 if the table isn't currently valid. */ | 52 | or 0 if the table isn't currently valid. */ |
| 56 | #define GLYPH_TABLE_LENGTH \ | 53 | #define GLYPH_TABLE_LENGTH \ |
| @@ -35,8 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | #include "keyboard.h" | 35 | #include "keyboard.h" |
| 36 | #include "keymap.h" | 36 | #include "keymap.h" |
| 37 | 37 | ||
| 38 | Lisp_Object Qfunction_documentation; | ||
| 39 | |||
| 40 | /* Buffer used for reading from documentation file. */ | 38 | /* Buffer used for reading from documentation file. */ |
| 41 | static char *get_doc_string_buffer; | 39 | static char *get_doc_string_buffer; |
| 42 | static ptrdiff_t get_doc_string_buffer_size; | 40 | static ptrdiff_t get_doc_string_buffer_size; |
diff --git a/src/dosfns.c b/src/dosfns.c index 8c0fed2230f..e506e9fbe14 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -409,8 +409,6 @@ msdos_stdcolor_idx (const char *name) | |||
| 409 | Lisp_Object | 409 | Lisp_Object |
| 410 | msdos_stdcolor_name (int idx) | 410 | msdos_stdcolor_name (int idx) |
| 411 | { | 411 | { |
| 412 | extern Lisp_Object Qunspecified; | ||
| 413 | |||
| 414 | if (idx == FACE_TTY_DEFAULT_FG_COLOR) | 412 | if (idx == FACE_TTY_DEFAULT_FG_COLOR) |
| 415 | return build_string (unspecified_fg); | 413 | return build_string (unspecified_fg); |
| 416 | else if (idx == FACE_TTY_DEFAULT_BG_COLOR) | 414 | else if (idx == FACE_TTY_DEFAULT_BG_COLOR) |
diff --git a/src/editfns.c b/src/editfns.c index 37f85b3ada3..cd15f6569aa 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -76,16 +76,6 @@ static void update_buffer_properties (ptrdiff_t, ptrdiff_t); | |||
| 76 | # define HAVE_TM_GMTOFF false | 76 | # define HAVE_TM_GMTOFF false |
| 77 | #endif | 77 | #endif |
| 78 | 78 | ||
| 79 | static Lisp_Object Qbuffer_access_fontify_functions; | ||
| 80 | |||
| 81 | /* Symbol for the text property used to mark fields. */ | ||
| 82 | |||
| 83 | Lisp_Object Qfield; | ||
| 84 | |||
| 85 | /* A special value for Qfield properties. */ | ||
| 86 | |||
| 87 | static Lisp_Object Qboundary; | ||
| 88 | |||
| 89 | /* The startup value of the TZ environment variable; null if unset. */ | 79 | /* The startup value of the TZ environment variable; null if unset. */ |
| 90 | static char const *initial_tz; | 80 | static char const *initial_tz; |
| 91 | 81 | ||
| @@ -915,17 +905,11 @@ save_excursion_restore (Lisp_Object info) | |||
| 915 | if (! NILP (tem)) | 905 | if (! NILP (tem)) |
| 916 | { | 906 | { |
| 917 | if (! EQ (omark, nmark)) | 907 | if (! EQ (omark, nmark)) |
| 918 | { | 908 | run_hook (intern ("activate-mark-hook")); |
| 919 | tem = intern ("activate-mark-hook"); | ||
| 920 | Frun_hooks (1, &tem); | ||
| 921 | } | ||
| 922 | } | 909 | } |
| 923 | /* If mark has ceased to be active, run deactivate hook. */ | 910 | /* If mark has ceased to be active, run deactivate hook. */ |
| 924 | else if (! NILP (tem1)) | 911 | else if (! NILP (tem1)) |
| 925 | { | 912 | run_hook (intern ("deactivate-mark-hook")); |
| 926 | tem = intern ("deactivate-mark-hook"); | ||
| 927 | Frun_hooks (1, &tem); | ||
| 928 | } | ||
| 929 | 913 | ||
| 930 | /* If buffer was visible in a window, and a different window was | 914 | /* If buffer was visible in a window, and a different window was |
| 931 | selected, and the old selected window is still showing this | 915 | selected, and the old selected window is still showing this |
| @@ -5009,8 +4993,12 @@ functions if all the text being accessed has this property. */); | |||
| 5009 | defsubr (&Sregion_beginning); | 4993 | defsubr (&Sregion_beginning); |
| 5010 | defsubr (&Sregion_end); | 4994 | defsubr (&Sregion_end); |
| 5011 | 4995 | ||
| 4996 | /* Symbol for the text property used to mark fields. */ | ||
| 5012 | DEFSYM (Qfield, "field"); | 4997 | DEFSYM (Qfield, "field"); |
| 4998 | |||
| 4999 | /* A special value for Qfield properties. */ | ||
| 5013 | DEFSYM (Qboundary, "boundary"); | 5000 | DEFSYM (Qboundary, "boundary"); |
| 5001 | |||
| 5014 | defsubr (&Sfield_beginning); | 5002 | defsubr (&Sfield_beginning); |
| 5015 | defsubr (&Sfield_end); | 5003 | defsubr (&Sfield_end); |
| 5016 | defsubr (&Sfield_string); | 5004 | defsubr (&Sfield_string); |
diff --git a/src/emacs.c b/src/emacs.c index e7131c02f62..e7094b11580 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -151,13 +151,6 @@ static bool malloc_using_checking; | |||
| 151 | extern void malloc_enable_thread (void); | 151 | extern void malloc_enable_thread (void); |
| 152 | #endif | 152 | #endif |
| 153 | 153 | ||
| 154 | Lisp_Object Qfile_name_handler_alist; | ||
| 155 | |||
| 156 | Lisp_Object Qrisky_local_variable; | ||
| 157 | |||
| 158 | Lisp_Object Qkill_emacs; | ||
| 159 | static Lisp_Object Qkill_emacs_hook; | ||
| 160 | |||
| 161 | /* If true, Emacs should not attempt to use a window-specific code, | 154 | /* If true, Emacs should not attempt to use a window-specific code, |
| 162 | but instead should use the virtual terminal under which it was started. */ | 155 | but instead should use the virtual terminal under which it was started. */ |
| 163 | bool inhibit_window_system; | 156 | bool inhibit_window_system; |
| @@ -1919,7 +1912,7 @@ all of which are called before Emacs is actually killed. */) | |||
| 1919 | /* Fsignal calls emacs_abort () if it sees that waiting_for_input is | 1912 | /* Fsignal calls emacs_abort () if it sees that waiting_for_input is |
| 1920 | set. */ | 1913 | set. */ |
| 1921 | waiting_for_input = 0; | 1914 | waiting_for_input = 0; |
| 1922 | Frun_hooks (1, &Qkill_emacs_hook); | 1915 | run_hook (Qkill_emacs_hook); |
| 1923 | UNGCPRO; | 1916 | UNGCPRO; |
| 1924 | 1917 | ||
| 1925 | #ifdef HAVE_X_WINDOWS | 1918 | #ifdef HAVE_X_WINDOWS |
diff --git a/src/eval.c b/src/eval.c index 4748712708f..7e4b016b236 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -38,22 +38,6 @@ struct handler *handlerlist; | |||
| 38 | int gcpro_level; | 38 | int gcpro_level; |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp; | ||
| 42 | Lisp_Object Qinhibit_quit; | ||
| 43 | Lisp_Object Qand_rest; | ||
| 44 | static Lisp_Object Qand_optional; | ||
| 45 | static Lisp_Object Qinhibit_debugger; | ||
| 46 | static Lisp_Object Qdeclare; | ||
| 47 | Lisp_Object Qinternal_interpreter_environment, Qclosure; | ||
| 48 | |||
| 49 | static Lisp_Object Qdebug; | ||
| 50 | |||
| 51 | /* This holds either the symbol `run-hooks' or nil. | ||
| 52 | It is nil at an early stage of startup, and when Emacs | ||
| 53 | is shutting down. */ | ||
| 54 | |||
| 55 | Lisp_Object Vrun_hooks; | ||
| 56 | |||
| 57 | /* Non-nil means record all fset's and provide's, to be undone | 41 | /* Non-nil means record all fset's and provide's, to be undone |
| 58 | if the file being autoloaded is not fully loaded. | 42 | if the file being autoloaded is not fully loaded. |
| 59 | They are recorded by being consed onto the front of Vautoload_queue: | 43 | They are recorded by being consed onto the front of Vautoload_queue: |
| @@ -61,6 +45,11 @@ Lisp_Object Vrun_hooks; | |||
| 61 | 45 | ||
| 62 | Lisp_Object Vautoload_queue; | 46 | Lisp_Object Vautoload_queue; |
| 63 | 47 | ||
| 48 | /* This holds either the symbol `run-hooks' or nil. | ||
| 49 | It is nil at an early stage of startup, and when Emacs | ||
| 50 | is shutting down. */ | ||
| 51 | Lisp_Object Vrun_hooks; | ||
| 52 | |||
| 64 | /* Current number of specbindings allocated in specpdl, not counting | 53 | /* Current number of specbindings allocated in specpdl, not counting |
| 65 | the dummy entry specpdl[-1]. */ | 54 | the dummy entry specpdl[-1]. */ |
| 66 | 55 | ||
| @@ -2363,14 +2352,10 @@ Instead, use `add-hook' and specify t for the LOCAL argument. | |||
| 2363 | usage: (run-hooks &rest HOOKS) */) | 2352 | usage: (run-hooks &rest HOOKS) */) |
| 2364 | (ptrdiff_t nargs, Lisp_Object *args) | 2353 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2365 | { | 2354 | { |
| 2366 | Lisp_Object hook[1]; | ||
| 2367 | ptrdiff_t i; | 2355 | ptrdiff_t i; |
| 2368 | 2356 | ||
| 2369 | for (i = 0; i < nargs; i++) | 2357 | for (i = 0; i < nargs; i++) |
| 2370 | { | 2358 | run_hook (args[i]); |
| 2371 | hook[0] = args[i]; | ||
| 2372 | run_hook_with_args (1, hook, funcall_nil); | ||
| 2373 | } | ||
| 2374 | 2359 | ||
| 2375 | return Qnil; | 2360 | return Qnil; |
| 2376 | } | 2361 | } |
| @@ -2536,6 +2521,14 @@ run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, | |||
| 2536 | } | 2521 | } |
| 2537 | } | 2522 | } |
| 2538 | 2523 | ||
| 2524 | /* Run the hook HOOK, giving each function no args. */ | ||
| 2525 | |||
| 2526 | void | ||
| 2527 | run_hook (Lisp_Object hook) | ||
| 2528 | { | ||
| 2529 | Frun_hook_with_args (1, &hook); | ||
| 2530 | } | ||
| 2531 | |||
| 2539 | /* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ | 2532 | /* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ |
| 2540 | 2533 | ||
| 2541 | void | 2534 | void |
| @@ -3762,7 +3755,8 @@ alist of active lexical bindings. */); | |||
| 3762 | (Just imagine if someone makes it buffer-local). */ | 3755 | (Just imagine if someone makes it buffer-local). */ |
| 3763 | Funintern (Qinternal_interpreter_environment, Qnil); | 3756 | Funintern (Qinternal_interpreter_environment, Qnil); |
| 3764 | 3757 | ||
| 3765 | DEFSYM (Vrun_hooks, "run-hooks"); | 3758 | Vrun_hooks = intern_c_string ("run-hooks"); |
| 3759 | staticpro (&Vrun_hooks); | ||
| 3766 | 3760 | ||
| 3767 | staticpro (&Vautoload_queue); | 3761 | staticpro (&Vautoload_queue); |
| 3768 | Vautoload_queue = Qnil; | 3762 | Vautoload_queue = Qnil; |
diff --git a/src/fileio.c b/src/fileio.c index 0f0fd1a5c8d..15c6f9123a2 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -113,50 +113,10 @@ static bool auto_save_error_occurred; | |||
| 113 | static bool valid_timestamp_file_system; | 113 | static bool valid_timestamp_file_system; |
| 114 | static dev_t timestamp_file_system; | 114 | static dev_t timestamp_file_system; |
| 115 | 115 | ||
| 116 | /* The symbol bound to coding-system-for-read when | ||
| 117 | insert-file-contents is called for recovering a file. This is not | ||
| 118 | an actual coding system name, but just an indicator to tell | ||
| 119 | insert-file-contents to use `emacs-mule' with a special flag for | ||
| 120 | auto saving and recovering a file. */ | ||
| 121 | static Lisp_Object Qauto_save_coding; | ||
| 122 | |||
| 123 | /* Property name of a file name handler, | ||
| 124 | which gives a list of operations it handles.. */ | ||
| 125 | static Lisp_Object Qoperations; | ||
| 126 | |||
| 127 | /* Lisp functions for translating file formats. */ | ||
| 128 | static Lisp_Object Qformat_decode, Qformat_annotate_function; | ||
| 129 | |||
| 130 | /* Lisp function for setting buffer-file-coding-system and the | ||
| 131 | multibyteness of the current buffer after inserting a file. */ | ||
| 132 | static Lisp_Object Qafter_insert_file_set_coding; | ||
| 133 | |||
| 134 | static Lisp_Object Qwrite_region_annotate_functions; | ||
| 135 | /* Each time an annotation function changes the buffer, the new buffer | 116 | /* Each time an annotation function changes the buffer, the new buffer |
| 136 | is added here. */ | 117 | is added here. */ |
| 137 | static Lisp_Object Vwrite_region_annotation_buffers; | 118 | static Lisp_Object Vwrite_region_annotation_buffers; |
| 138 | 119 | ||
| 139 | static Lisp_Object Qdelete_by_moving_to_trash; | ||
| 140 | |||
| 141 | /* Lisp function for moving files to trash. */ | ||
| 142 | static Lisp_Object Qmove_file_to_trash; | ||
| 143 | |||
| 144 | /* Lisp function for recursively copying directories. */ | ||
| 145 | static Lisp_Object Qcopy_directory; | ||
| 146 | |||
| 147 | /* Lisp function for recursively deleting directories. */ | ||
| 148 | static Lisp_Object Qdelete_directory; | ||
| 149 | |||
| 150 | static Lisp_Object Qsubstitute_env_in_file_name; | ||
| 151 | static Lisp_Object Qget_buffer_window_list; | ||
| 152 | |||
| 153 | Lisp_Object Qfile_error, Qfile_notify_error; | ||
| 154 | static Lisp_Object Qfile_already_exists, Qfile_date_error; | ||
| 155 | static Lisp_Object Qexcl; | ||
| 156 | Lisp_Object Qfile_name_history; | ||
| 157 | |||
| 158 | static Lisp_Object Qcar_less_than_car; | ||
| 159 | |||
| 160 | static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, | 120 | static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 161 | Lisp_Object *, struct coding_system *); | 121 | Lisp_Object *, struct coding_system *); |
| 162 | static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, | 122 | static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, |
| @@ -291,43 +251,6 @@ restore_point_unwind (Lisp_Object location) | |||
| 291 | } | 251 | } |
| 292 | 252 | ||
| 293 | 253 | ||
| 294 | static Lisp_Object Qexpand_file_name; | ||
| 295 | static Lisp_Object Qsubstitute_in_file_name; | ||
| 296 | static Lisp_Object Qdirectory_file_name; | ||
| 297 | static Lisp_Object Qfile_name_directory; | ||
| 298 | static Lisp_Object Qfile_name_nondirectory; | ||
| 299 | static Lisp_Object Qunhandled_file_name_directory; | ||
| 300 | static Lisp_Object Qfile_name_as_directory; | ||
| 301 | static Lisp_Object Qcopy_file; | ||
| 302 | static Lisp_Object Qmake_directory_internal; | ||
| 303 | static Lisp_Object Qmake_directory; | ||
| 304 | static Lisp_Object Qdelete_directory_internal; | ||
| 305 | Lisp_Object Qdelete_file; | ||
| 306 | static Lisp_Object Qrename_file; | ||
| 307 | static Lisp_Object Qadd_name_to_file; | ||
| 308 | static Lisp_Object Qmake_symbolic_link; | ||
| 309 | Lisp_Object Qfile_exists_p; | ||
| 310 | static Lisp_Object Qfile_executable_p; | ||
| 311 | static Lisp_Object Qfile_readable_p; | ||
| 312 | static Lisp_Object Qfile_writable_p; | ||
| 313 | static Lisp_Object Qfile_symlink_p; | ||
| 314 | static Lisp_Object Qaccess_file; | ||
| 315 | Lisp_Object Qfile_directory_p; | ||
| 316 | static Lisp_Object Qfile_regular_p; | ||
| 317 | static Lisp_Object Qfile_accessible_directory_p; | ||
| 318 | static Lisp_Object Qfile_modes; | ||
| 319 | static Lisp_Object Qset_file_modes; | ||
| 320 | static Lisp_Object Qset_file_times; | ||
| 321 | static Lisp_Object Qfile_selinux_context; | ||
| 322 | static Lisp_Object Qset_file_selinux_context; | ||
| 323 | static Lisp_Object Qfile_acl; | ||
| 324 | static Lisp_Object Qset_file_acl; | ||
| 325 | static Lisp_Object Qfile_newer_than_file_p; | ||
| 326 | Lisp_Object Qinsert_file_contents; | ||
| 327 | Lisp_Object Qwrite_region; | ||
| 328 | static Lisp_Object Qverify_visited_file_modtime; | ||
| 329 | static Lisp_Object Qset_visited_file_modtime; | ||
| 330 | |||
| 331 | DEFUN ("find-file-name-handler", Ffind_file_name_handler, | 254 | DEFUN ("find-file-name-handler", Ffind_file_name_handler, |
| 332 | Sfind_file_name_handler, 2, 2, 0, | 255 | Sfind_file_name_handler, 2, 2, 0, |
| 333 | doc: /* Return FILENAME's handler function for OPERATION, if it has one. | 256 | doc: /* Return FILENAME's handler function for OPERATION, if it has one. |
| @@ -5866,7 +5789,10 @@ init_fileio (void) | |||
| 5866 | void | 5789 | void |
| 5867 | syms_of_fileio (void) | 5790 | syms_of_fileio (void) |
| 5868 | { | 5791 | { |
| 5792 | /* Property name of a file name handler, | ||
| 5793 | which gives a list of operations it handles. */ | ||
| 5869 | DEFSYM (Qoperations, "operations"); | 5794 | DEFSYM (Qoperations, "operations"); |
| 5795 | |||
| 5870 | DEFSYM (Qexpand_file_name, "expand-file-name"); | 5796 | DEFSYM (Qexpand_file_name, "expand-file-name"); |
| 5871 | DEFSYM (Qsubstitute_in_file_name, "substitute-in-file-name"); | 5797 | DEFSYM (Qsubstitute_in_file_name, "substitute-in-file-name"); |
| 5872 | DEFSYM (Qdirectory_file_name, "directory-file-name"); | 5798 | DEFSYM (Qdirectory_file_name, "directory-file-name"); |
| @@ -5903,6 +5829,12 @@ syms_of_fileio (void) | |||
| 5903 | DEFSYM (Qwrite_region, "write-region"); | 5829 | DEFSYM (Qwrite_region, "write-region"); |
| 5904 | DEFSYM (Qverify_visited_file_modtime, "verify-visited-file-modtime"); | 5830 | DEFSYM (Qverify_visited_file_modtime, "verify-visited-file-modtime"); |
| 5905 | DEFSYM (Qset_visited_file_modtime, "set-visited-file-modtime"); | 5831 | DEFSYM (Qset_visited_file_modtime, "set-visited-file-modtime"); |
| 5832 | |||
| 5833 | /* The symbol bound to coding-system-for-read when | ||
| 5834 | insert-file-contents is called for recovering a file. This is not | ||
| 5835 | an actual coding system name, but just an indicator to tell | ||
| 5836 | insert-file-contents to use `emacs-mule' with a special flag for | ||
| 5837 | auto saving and recovering a file. */ | ||
| 5906 | DEFSYM (Qauto_save_coding, "auto-save-coding"); | 5838 | DEFSYM (Qauto_save_coding, "auto-save-coding"); |
| 5907 | 5839 | ||
| 5908 | DEFSYM (Qfile_name_history, "file-name-history"); | 5840 | DEFSYM (Qfile_name_history, "file-name-history"); |
| @@ -5938,9 +5870,14 @@ On MS-Windows, the value of this variable is largely ignored if | |||
| 5938 | behaves as if file names were encoded in `utf-8'. */); | 5870 | behaves as if file names were encoded in `utf-8'. */); |
| 5939 | Vdefault_file_name_coding_system = Qnil; | 5871 | Vdefault_file_name_coding_system = Qnil; |
| 5940 | 5872 | ||
| 5873 | /* Lisp functions for translating file formats. */ | ||
| 5941 | DEFSYM (Qformat_decode, "format-decode"); | 5874 | DEFSYM (Qformat_decode, "format-decode"); |
| 5942 | DEFSYM (Qformat_annotate_function, "format-annotate-function"); | 5875 | DEFSYM (Qformat_annotate_function, "format-annotate-function"); |
| 5876 | |||
| 5877 | /* Lisp function for setting buffer-file-coding-system and the | ||
| 5878 | multibyteness of the current buffer after inserting a file. */ | ||
| 5943 | DEFSYM (Qafter_insert_file_set_coding, "after-insert-file-set-coding"); | 5879 | DEFSYM (Qafter_insert_file_set_coding, "after-insert-file-set-coding"); |
| 5880 | |||
| 5944 | DEFSYM (Qcar_less_than_car, "car-less-than-car"); | 5881 | DEFSYM (Qcar_less_than_car, "car-less-than-car"); |
| 5945 | 5882 | ||
| 5946 | Fput (Qfile_error, Qerror_conditions, | 5883 | Fput (Qfile_error, Qerror_conditions, |
| @@ -6094,11 +6031,17 @@ When non-nil, certain file deletion commands use the function | |||
| 6094 | This includes interactive calls to `delete-file' and | 6031 | This includes interactive calls to `delete-file' and |
| 6095 | `delete-directory' and the Dired deletion commands. */); | 6032 | `delete-directory' and the Dired deletion commands. */); |
| 6096 | delete_by_moving_to_trash = 0; | 6033 | delete_by_moving_to_trash = 0; |
| 6097 | Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); | 6034 | DEFSYM (Qdelete_by_moving_to_trash, "delete-by-moving-to-trash"); |
| 6098 | 6035 | ||
| 6036 | /* Lisp function for moving files to trash. */ | ||
| 6099 | DEFSYM (Qmove_file_to_trash, "move-file-to-trash"); | 6037 | DEFSYM (Qmove_file_to_trash, "move-file-to-trash"); |
| 6038 | |||
| 6039 | /* Lisp function for recursively copying directories. */ | ||
| 6100 | DEFSYM (Qcopy_directory, "copy-directory"); | 6040 | DEFSYM (Qcopy_directory, "copy-directory"); |
| 6041 | |||
| 6042 | /* Lisp function for recursively deleting directories. */ | ||
| 6101 | DEFSYM (Qdelete_directory, "delete-directory"); | 6043 | DEFSYM (Qdelete_directory, "delete-directory"); |
| 6044 | |||
| 6102 | DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name"); | 6045 | DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name"); |
| 6103 | DEFSYM (Qget_buffer_window_list, "get-buffer-window-list"); | 6046 | DEFSYM (Qget_buffer_window_list, "get-buffer-window-list"); |
| 6104 | 6047 | ||
| @@ -41,16 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 41 | #include "xterm.h" | 41 | #include "xterm.h" |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | Lisp_Object Qstring_lessp; | ||
| 45 | static Lisp_Object Qstring_collate_lessp, Qstring_collate_equalp; | ||
| 46 | static Lisp_Object Qprovide, Qrequire; | ||
| 47 | static Lisp_Object Qyes_or_no_p_history; | ||
| 48 | Lisp_Object Qcursor_in_echo_area; | ||
| 49 | static Lisp_Object Qwidget_type; | ||
| 50 | static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; | ||
| 51 | |||
| 52 | static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512; | ||
| 53 | |||
| 54 | static void sort_vector_copy (Lisp_Object, ptrdiff_t, | 44 | static void sort_vector_copy (Lisp_Object, ptrdiff_t, |
| 55 | Lisp_Object [restrict], Lisp_Object [restrict]); | 45 | Lisp_Object [restrict], Lisp_Object [restrict]); |
| 56 | static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object); | 46 | static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object); |
| @@ -2788,8 +2778,6 @@ advisable. */) | |||
| 2788 | return ret; | 2778 | return ret; |
| 2789 | } | 2779 | } |
| 2790 | 2780 | ||
| 2791 | static Lisp_Object Qsubfeatures; | ||
| 2792 | |||
| 2793 | DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, | 2781 | DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, |
| 2794 | doc: /* Return t if FEATURE is present in this Emacs. | 2782 | doc: /* Return t if FEATURE is present in this Emacs. |
| 2795 | 2783 | ||
| @@ -2808,8 +2796,6 @@ SUBFEATURE can be used to check a specific subfeature of FEATURE. */) | |||
| 2808 | return (NILP (tem)) ? Qnil : Qt; | 2796 | return (NILP (tem)) ? Qnil : Qt; |
| 2809 | } | 2797 | } |
| 2810 | 2798 | ||
| 2811 | static Lisp_Object Qfuncall; | ||
| 2812 | |||
| 2813 | DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, | 2799 | DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, |
| 2814 | doc: /* Announce that FEATURE is a feature of the current Emacs. | 2800 | doc: /* Announce that FEATURE is a feature of the current Emacs. |
| 2815 | The optional argument SUBFEATURES should be a list of symbols listing | 2801 | The optional argument SUBFEATURES should be a list of symbols listing |
| @@ -3596,14 +3582,6 @@ base64_decode_1 (const char *from, char *to, ptrdiff_t length, | |||
| 3596 | 3582 | ||
| 3597 | static struct Lisp_Hash_Table *weak_hash_tables; | 3583 | static struct Lisp_Hash_Table *weak_hash_tables; |
| 3598 | 3584 | ||
| 3599 | /* Various symbols. */ | ||
| 3600 | |||
| 3601 | static Lisp_Object Qhash_table_p; | ||
| 3602 | static Lisp_Object Qkey, Qvalue, Qeql; | ||
| 3603 | Lisp_Object Qeq, Qequal; | ||
| 3604 | Lisp_Object QCtest, QCsize, QCrehash_size, QCrehash_threshold, QCweakness; | ||
| 3605 | static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; | ||
| 3606 | |||
| 3607 | 3585 | ||
| 3608 | /*********************************************************************** | 3586 | /*********************************************************************** |
| 3609 | Utilities | 3587 | Utilities |
diff --git a/src/font.c b/src/font.c index dea18a1e939..a68c3c707c8 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -41,16 +41,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 41 | #include TERM_HEADER | 41 | #include TERM_HEADER |
| 42 | #endif /* HAVE_WINDOW_SYSTEM */ | 42 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 43 | 43 | ||
| 44 | Lisp_Object Qopentype; | ||
| 45 | |||
| 46 | /* Important character set strings. */ | ||
| 47 | Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip; | ||
| 48 | |||
| 49 | #define DEFAULT_ENCODING Qiso8859_1 | 44 | #define DEFAULT_ENCODING Qiso8859_1 |
| 50 | 45 | ||
| 51 | /* Unicode category `Cf'. */ | ||
| 52 | static Lisp_Object QCf; | ||
| 53 | |||
| 54 | /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ | 46 | /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ |
| 55 | static Lisp_Object font_style_table; | 47 | static Lisp_Object font_style_table; |
| 56 | 48 | ||
| @@ -110,21 +102,6 @@ static const struct table_entry width_table[] = | |||
| 110 | { 200, { "ultra-expanded", "ultraexpanded", "wide" }} | 102 | { 200, { "ultra-expanded", "ultraexpanded", "wide" }} |
| 111 | }; | 103 | }; |
| 112 | 104 | ||
| 113 | Lisp_Object QCfoundry; | ||
| 114 | static Lisp_Object QCadstyle, QCregistry; | ||
| 115 | /* Symbols representing keys of font extra info. */ | ||
| 116 | Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth; | ||
| 117 | Lisp_Object QCantialias, QCfont_entity; | ||
| 118 | static Lisp_Object QCfc_unknown_spec; | ||
| 119 | /* Symbols representing values of font spacing property. */ | ||
| 120 | static Lisp_Object Qc, Qm, Qd; | ||
| 121 | Lisp_Object Qp; | ||
| 122 | /* Special ADSTYLE properties to avoid fonts used for Latin | ||
| 123 | characters; used in xfont.c and ftfont.c. */ | ||
| 124 | Lisp_Object Qja, Qko; | ||
| 125 | |||
| 126 | static Lisp_Object QCuser_spec; | ||
| 127 | |||
| 128 | /* Alist of font registry symbols and the corresponding charset | 105 | /* Alist of font registry symbols and the corresponding charset |
| 129 | information. The information is retrieved from | 106 | information. The information is retrieved from |
| 130 | Vfont_encoding_alist on demand. | 107 | Vfont_encoding_alist on demand. |
| @@ -309,7 +286,7 @@ font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol) | |||
| 309 | return tem; | 286 | return tem; |
| 310 | name = make_specified_string (str, nchars, len, | 287 | name = make_specified_string (str, nchars, len, |
| 311 | len != nchars && len == nbytes); | 288 | len != nchars && len == nbytes); |
| 312 | return intern_driver (name, obarray, XINT (tem)); | 289 | return intern_driver (name, obarray, tem); |
| 313 | } | 290 | } |
| 314 | 291 | ||
| 315 | /* Return a pixel size of font-spec SPEC on frame F. */ | 292 | /* Return a pixel size of font-spec SPEC on frame F. */ |
| @@ -662,30 +639,30 @@ font_prop_validate_otf (Lisp_Object prop, Lisp_Object val) | |||
| 662 | values. */ | 639 | values. */ |
| 663 | static const struct | 640 | static const struct |
| 664 | { | 641 | { |
| 665 | /* Pointer to the key symbol. */ | 642 | /* Index of the key symbol. */ |
| 666 | Lisp_Object *key; | 643 | int key; |
| 667 | /* Function to validate PROP's value VAL, or NULL if any value is | 644 | /* Function to validate PROP's value VAL, or NULL if any value is |
| 668 | ok. The value is VAL or its regularized value if VAL is valid, | 645 | ok. The value is VAL or its regularized value if VAL is valid, |
| 669 | and Qerror if not. */ | 646 | and Qerror if not. */ |
| 670 | Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val); | 647 | Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val); |
| 671 | } font_property_table[] = | 648 | } font_property_table[] = |
| 672 | { { &QCtype, font_prop_validate_symbol }, | 649 | { { SYMBOL_INDEX (QCtype), font_prop_validate_symbol }, |
| 673 | { &QCfoundry, font_prop_validate_symbol }, | 650 | { SYMBOL_INDEX (QCfoundry), font_prop_validate_symbol }, |
| 674 | { &QCfamily, font_prop_validate_symbol }, | 651 | { SYMBOL_INDEX (QCfamily), font_prop_validate_symbol }, |
| 675 | { &QCadstyle, font_prop_validate_symbol }, | 652 | { SYMBOL_INDEX (QCadstyle), font_prop_validate_symbol }, |
| 676 | { &QCregistry, font_prop_validate_symbol }, | 653 | { SYMBOL_INDEX (QCregistry), font_prop_validate_symbol }, |
| 677 | { &QCweight, font_prop_validate_style }, | 654 | { SYMBOL_INDEX (QCweight), font_prop_validate_style }, |
| 678 | { &QCslant, font_prop_validate_style }, | 655 | { SYMBOL_INDEX (QCslant), font_prop_validate_style }, |
| 679 | { &QCwidth, font_prop_validate_style }, | 656 | { SYMBOL_INDEX (QCwidth), font_prop_validate_style }, |
| 680 | { &QCsize, font_prop_validate_non_neg }, | 657 | { SYMBOL_INDEX (QCsize), font_prop_validate_non_neg }, |
| 681 | { &QCdpi, font_prop_validate_non_neg }, | 658 | { SYMBOL_INDEX (QCdpi), font_prop_validate_non_neg }, |
| 682 | { &QCspacing, font_prop_validate_spacing }, | 659 | { SYMBOL_INDEX (QCspacing), font_prop_validate_spacing }, |
| 683 | { &QCavgwidth, font_prop_validate_non_neg }, | 660 | { SYMBOL_INDEX (QCavgwidth), font_prop_validate_non_neg }, |
| 684 | /* The order of the above entries must match with enum | 661 | /* The order of the above entries must match with enum |
| 685 | font_property_index. */ | 662 | font_property_index. */ |
| 686 | { &QClang, font_prop_validate_symbol }, | 663 | { SYMBOL_INDEX (QClang), font_prop_validate_symbol }, |
| 687 | { &QCscript, font_prop_validate_symbol }, | 664 | { SYMBOL_INDEX (QCscript), font_prop_validate_symbol }, |
| 688 | { &QCotf, font_prop_validate_otf } | 665 | { SYMBOL_INDEX (QCotf), font_prop_validate_otf } |
| 689 | }; | 666 | }; |
| 690 | 667 | ||
| 691 | /* Return an index number of font property KEY or -1 if KEY is not an | 668 | /* Return an index number of font property KEY or -1 if KEY is not an |
| @@ -697,7 +674,7 @@ get_font_prop_index (Lisp_Object key) | |||
| 697 | int i; | 674 | int i; |
| 698 | 675 | ||
| 699 | for (i = 0; i < ARRAYELTS (font_property_table); i++) | 676 | for (i = 0; i < ARRAYELTS (font_property_table); i++) |
| 700 | if (EQ (key, *font_property_table[i].key)) | 677 | if (EQ (key, builtin_lisp_symbol (font_property_table[i].key))) |
| 701 | return i; | 678 | return i; |
| 702 | return -1; | 679 | return -1; |
| 703 | } | 680 | } |
| @@ -714,7 +691,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val) | |||
| 714 | if (NILP (val)) | 691 | if (NILP (val)) |
| 715 | return val; | 692 | return val; |
| 716 | if (NILP (prop)) | 693 | if (NILP (prop)) |
| 717 | prop = *font_property_table[idx].key; | 694 | prop = builtin_lisp_symbol (font_property_table[idx].key); |
| 718 | else | 695 | else |
| 719 | { | 696 | { |
| 720 | idx = get_font_prop_index (prop); | 697 | idx = get_font_prop_index (prop); |
| @@ -5169,19 +5146,21 @@ syms_of_font (void) | |||
| 5169 | 5146 | ||
| 5170 | DEFSYM (Qopentype, "opentype"); | 5147 | DEFSYM (Qopentype, "opentype"); |
| 5171 | 5148 | ||
| 5149 | /* Important character set symbols. */ | ||
| 5172 | DEFSYM (Qascii_0, "ascii-0"); | 5150 | DEFSYM (Qascii_0, "ascii-0"); |
| 5173 | DEFSYM (Qiso8859_1, "iso8859-1"); | 5151 | DEFSYM (Qiso8859_1, "iso8859-1"); |
| 5174 | DEFSYM (Qiso10646_1, "iso10646-1"); | 5152 | DEFSYM (Qiso10646_1, "iso10646-1"); |
| 5175 | DEFSYM (Qunicode_bmp, "unicode-bmp"); | 5153 | DEFSYM (Qunicode_bmp, "unicode-bmp"); |
| 5176 | DEFSYM (Qunicode_sip, "unicode-sip"); | 5154 | DEFSYM (Qunicode_sip, "unicode-sip"); |
| 5177 | 5155 | ||
| 5156 | /* Unicode category `Cf'. */ | ||
| 5178 | DEFSYM (QCf, "Cf"); | 5157 | DEFSYM (QCf, "Cf"); |
| 5179 | 5158 | ||
| 5159 | /* Symbols representing keys of font extra info. */ | ||
| 5180 | DEFSYM (QCotf, ":otf"); | 5160 | DEFSYM (QCotf, ":otf"); |
| 5181 | DEFSYM (QClang, ":lang"); | 5161 | DEFSYM (QClang, ":lang"); |
| 5182 | DEFSYM (QCscript, ":script"); | 5162 | DEFSYM (QCscript, ":script"); |
| 5183 | DEFSYM (QCantialias, ":antialias"); | 5163 | DEFSYM (QCantialias, ":antialias"); |
| 5184 | |||
| 5185 | DEFSYM (QCfoundry, ":foundry"); | 5164 | DEFSYM (QCfoundry, ":foundry"); |
| 5186 | DEFSYM (QCadstyle, ":adstyle"); | 5165 | DEFSYM (QCadstyle, ":adstyle"); |
| 5187 | DEFSYM (QCregistry, ":registry"); | 5166 | DEFSYM (QCregistry, ":registry"); |
| @@ -5192,11 +5171,14 @@ syms_of_font (void) | |||
| 5192 | DEFSYM (QCfont_entity, ":font-entity"); | 5171 | DEFSYM (QCfont_entity, ":font-entity"); |
| 5193 | DEFSYM (QCfc_unknown_spec, ":fc-unknown-spec"); | 5172 | DEFSYM (QCfc_unknown_spec, ":fc-unknown-spec"); |
| 5194 | 5173 | ||
| 5174 | /* Symbols representing values of font spacing property. */ | ||
| 5195 | DEFSYM (Qc, "c"); | 5175 | DEFSYM (Qc, "c"); |
| 5196 | DEFSYM (Qm, "m"); | 5176 | DEFSYM (Qm, "m"); |
| 5197 | DEFSYM (Qp, "p"); | 5177 | DEFSYM (Qp, "p"); |
| 5198 | DEFSYM (Qd, "d"); | 5178 | DEFSYM (Qd, "d"); |
| 5199 | 5179 | ||
| 5180 | /* Special ADSTYLE properties to avoid fonts used for Latin | ||
| 5181 | characters; used in xfont.c and ftfont.c. */ | ||
| 5200 | DEFSYM (Qja, "ja"); | 5182 | DEFSYM (Qja, "ja"); |
| 5201 | DEFSYM (Qko, "ko"); | 5183 | DEFSYM (Qko, "ko"); |
| 5202 | 5184 | ||
diff --git a/src/font.h b/src/font.h index 617860c85f1..5a3e38a2a6e 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -56,7 +56,6 @@ INLINE_HEADER_BEGIN | |||
| 56 | Note: Only the method `open' of a font-driver can create this | 56 | Note: Only the method `open' of a font-driver can create this |
| 57 | object, and it should never be modified by Lisp. */ | 57 | object, and it should never be modified by Lisp. */ |
| 58 | 58 | ||
| 59 | extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | ||
| 60 | 59 | ||
| 61 | /* An enumerator for each font property. This is used as an index to | 60 | /* An enumerator for each font property. This is used as an index to |
| 62 | the vector of FONT-SPEC and FONT-ENTITY. | 61 | the vector of FONT-SPEC and FONT-ENTITY. |
| @@ -239,17 +238,6 @@ enum font_property_index | |||
| 239 | #define FONT_BASE(f) ((f)->ascent) | 238 | #define FONT_BASE(f) ((f)->ascent) |
| 240 | #define FONT_DESCENT(f) ((f)->descent) | 239 | #define FONT_DESCENT(f) ((f)->descent) |
| 241 | 240 | ||
| 242 | extern Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript; | ||
| 243 | extern Lisp_Object QCavgwidth, QCantialias, QCfont_entity; | ||
| 244 | extern Lisp_Object Qp; | ||
| 245 | |||
| 246 | |||
| 247 | /* Important character set symbols. */ | ||
| 248 | extern Lisp_Object Qascii_0; | ||
| 249 | extern Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip; | ||
| 250 | |||
| 251 | /* Special ADSTYLE properties to avoid fonts used for Latin characters. */ | ||
| 252 | extern Lisp_Object Qja, Qko; | ||
| 253 | 241 | ||
| 254 | /* Structure for a font-spec. */ | 242 | /* Structure for a font-spec. */ |
| 255 | 243 | ||
| @@ -791,12 +779,11 @@ extern struct font_driver xfont_driver; | |||
| 791 | extern void syms_of_xfont (void); | 779 | extern void syms_of_xfont (void); |
| 792 | extern void syms_of_ftxfont (void); | 780 | extern void syms_of_ftxfont (void); |
| 793 | #ifdef HAVE_XFT | 781 | #ifdef HAVE_XFT |
| 794 | extern Lisp_Object Qxft; | ||
| 795 | extern struct font_driver xftfont_driver; | 782 | extern struct font_driver xftfont_driver; |
| 796 | extern void syms_of_xftfont (void); | ||
| 797 | #endif | 783 | #endif |
| 798 | #if defined HAVE_FREETYPE || defined HAVE_XFT | 784 | #if defined HAVE_FREETYPE || defined HAVE_XFT |
| 799 | extern struct font_driver ftxfont_driver; | 785 | extern struct font_driver ftxfont_driver; |
| 786 | extern void syms_of_xftfont (void); | ||
| 800 | #endif | 787 | #endif |
| 801 | #ifdef HAVE_BDFFONT | 788 | #ifdef HAVE_BDFFONT |
| 802 | extern void syms_of_bdffont (void); | 789 | extern void syms_of_bdffont (void); |
| @@ -808,7 +795,6 @@ extern struct font_driver uniscribe_font_driver; | |||
| 808 | extern void syms_of_w32font (void); | 795 | extern void syms_of_w32font (void); |
| 809 | #endif /* HAVE_NTGUI */ | 796 | #endif /* HAVE_NTGUI */ |
| 810 | #ifdef HAVE_NS | 797 | #ifdef HAVE_NS |
| 811 | extern Lisp_Object Qfontsize; | ||
| 812 | extern struct font_driver nsfont_driver; | 798 | extern struct font_driver nsfont_driver; |
| 813 | extern void syms_of_nsfont (void); | 799 | extern void syms_of_nsfont (void); |
| 814 | extern void syms_of_macfont (void); | 800 | extern void syms_of_macfont (void); |
| @@ -818,8 +804,6 @@ extern void syms_of_macfont (void); | |||
| 818 | #define FONT_DEBUG | 804 | #define FONT_DEBUG |
| 819 | #endif | 805 | #endif |
| 820 | 806 | ||
| 821 | extern Lisp_Object QCfoundry; | ||
| 822 | |||
| 823 | extern void font_add_log (const char *, Lisp_Object, Lisp_Object); | 807 | extern void font_add_log (const char *, Lisp_Object, Lisp_Object); |
| 824 | extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object); | 808 | extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object); |
| 825 | 809 | ||
diff --git a/src/fontset.c b/src/fontset.c index 974b144c259..b257da117b6 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -152,11 +152,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 152 | 152 | ||
| 153 | /********** VARIABLES and FUNCTION PROTOTYPES **********/ | 153 | /********** VARIABLES and FUNCTION PROTOTYPES **********/ |
| 154 | 154 | ||
| 155 | static Lisp_Object Qfontset; | ||
| 156 | static Lisp_Object Qfontset_info; | ||
| 157 | static Lisp_Object Qprepend, Qappend; | ||
| 158 | Lisp_Object Qlatin; | ||
| 159 | |||
| 160 | /* Vector containing all fontsets. */ | 155 | /* Vector containing all fontsets. */ |
| 161 | static Lisp_Object Vfontset_table; | 156 | static Lisp_Object Vfontset_table; |
| 162 | 157 | ||
diff --git a/src/fontset.h b/src/fontset.h index e743555ef76..610394431e1 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -36,7 +36,6 @@ extern int fontset_from_font (Lisp_Object); | |||
| 36 | extern int fs_query_fontset (Lisp_Object, int); | 36 | extern int fs_query_fontset (Lisp_Object, int); |
| 37 | extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int); | 37 | extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int); |
| 38 | 38 | ||
| 39 | extern Lisp_Object Qlatin; | ||
| 40 | extern Lisp_Object fontset_name (int); | 39 | extern Lisp_Object fontset_name (int); |
| 41 | extern Lisp_Object fontset_ascii (int); | 40 | extern Lisp_Object fontset_ascii (int); |
| 42 | 41 | ||
diff --git a/src/frame.c b/src/frame.c index 9394ae481f5..3d2ffbf624f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -55,76 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 55 | #include "widget.h" | 55 | #include "widget.h" |
| 56 | #endif | 56 | #endif |
| 57 | 57 | ||
| 58 | #ifdef HAVE_NS | ||
| 59 | Lisp_Object Qns_parse_geometry; | ||
| 60 | #endif | ||
| 61 | |||
| 62 | Lisp_Object Qframep, Qframe_live_p; | ||
| 63 | Lisp_Object Qicon, Qmodeline; | ||
| 64 | Lisp_Object Qonly, Qnone; | ||
| 65 | Lisp_Object Qx, Qw32, Qpc, Qns; | ||
| 66 | Lisp_Object Qvisible; | ||
| 67 | Lisp_Object Qdisplay_type; | ||
| 68 | static Lisp_Object Qbackground_mode; | ||
| 69 | Lisp_Object Qnoelisp; | ||
| 70 | |||
| 71 | static Lisp_Object Qx_frame_parameter; | ||
| 72 | Lisp_Object Qx_resource_name; | ||
| 73 | Lisp_Object Qterminal; | ||
| 74 | |||
| 75 | /* Frame parameters (set or reported). */ | ||
| 76 | |||
| 77 | Lisp_Object Qauto_raise, Qauto_lower; | ||
| 78 | Lisp_Object Qborder_color, Qborder_width; | ||
| 79 | Lisp_Object Qcursor_color, Qcursor_type; | ||
| 80 | Lisp_Object Qheight, Qwidth; | ||
| 81 | Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; | ||
| 82 | Lisp_Object Qtooltip; | ||
| 83 | Lisp_Object Qinternal_border_width; | ||
| 84 | Lisp_Object Qright_divider_width, Qbottom_divider_width; | ||
| 85 | Lisp_Object Qmouse_color; | ||
| 86 | Lisp_Object Qminibuffer; | ||
| 87 | Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars; | ||
| 88 | Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars; | ||
| 89 | Lisp_Object Qvisibility; | ||
| 90 | Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; | ||
| 91 | Lisp_Object Qscreen_gamma; | ||
| 92 | Lisp_Object Qline_spacing; | ||
| 93 | static Lisp_Object Quser_position, Quser_size; | ||
| 94 | Lisp_Object Qwait_for_wm; | ||
| 95 | static Lisp_Object Qwindow_id; | ||
| 96 | #ifdef HAVE_X_WINDOWS | ||
| 97 | static Lisp_Object Qouter_window_id; | ||
| 98 | #endif | ||
| 99 | Lisp_Object Qparent_id; | ||
| 100 | Lisp_Object Qtitle, Qname; | ||
| 101 | static Lisp_Object Qexplicit_name; | ||
| 102 | Lisp_Object Qunsplittable; | ||
| 103 | Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; | ||
| 104 | Lisp_Object Qleft_fringe, Qright_fringe; | ||
| 105 | Lisp_Object Qbuffer_predicate; | ||
| 106 | static Lisp_Object Qbuffer_list, Qburied_buffer_list; | ||
| 107 | Lisp_Object Qtty_color_mode; | ||
| 108 | Lisp_Object Qtty, Qtty_type; | ||
| 109 | |||
| 110 | Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth, Qmaximized; | ||
| 111 | Lisp_Object Qsticky; | ||
| 112 | Lisp_Object Qfont_backend; | ||
| 113 | Lisp_Object Qalpha; | ||
| 114 | |||
| 115 | Lisp_Object Qface_set_after_frame_default; | ||
| 116 | |||
| 117 | static Lisp_Object Qfocus_in_hook; | ||
| 118 | static Lisp_Object Qfocus_out_hook; | ||
| 119 | static Lisp_Object Qdelete_frame_functions; | ||
| 120 | static Lisp_Object Qframe_windows_min_size; | ||
| 121 | static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource; | ||
| 122 | |||
| 123 | Lisp_Object Qframe_position, Qframe_outer_size, Qframe_inner_size; | ||
| 124 | Lisp_Object Qexternal_border_size, Qtitle_height; | ||
| 125 | Lisp_Object Qmenu_bar_external, Qmenu_bar_size; | ||
| 126 | Lisp_Object Qtool_bar_external, Qtool_bar_size; | ||
| 127 | |||
| 128 | /* The currently selected frame. */ | 58 | /* The currently selected frame. */ |
| 129 | 59 | ||
| 130 | Lisp_Object selected_frame; | 60 | Lisp_Object selected_frame; |
| @@ -1221,7 +1151,7 @@ to that frame. */) | |||
| 1221 | { | 1151 | { |
| 1222 | /* Preserve prefix arg that the command loop just cleared. */ | 1152 | /* Preserve prefix arg that the command loop just cleared. */ |
| 1223 | kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); | 1153 | kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); |
| 1224 | Frun_hooks (1, &Qmouse_leave_buffer_hook); | 1154 | run_hook (Qmouse_leave_buffer_hook); |
| 1225 | /* `switch-frame' implies a focus in. */ | 1155 | /* `switch-frame' implies a focus in. */ |
| 1226 | call1 (intern ("handle-focus-in"), event); | 1156 | call1 (intern ("handle-focus-in"), event); |
| 1227 | return do_switch_frame (event, 0, 0, Qnil); | 1157 | return do_switch_frame (event, 0, 0, Qnil); |
| @@ -2995,48 +2925,48 @@ or bottommost possible position (that stays within the screen). */) | |||
| 2995 | 2925 | ||
| 2996 | struct frame_parm_table { | 2926 | struct frame_parm_table { |
| 2997 | const char *name; | 2927 | const char *name; |
| 2998 | Lisp_Object *variable; | 2928 | int sym; |
| 2999 | }; | 2929 | }; |
| 3000 | 2930 | ||
| 3001 | static const struct frame_parm_table frame_parms[] = | 2931 | static const struct frame_parm_table frame_parms[] = |
| 3002 | { | 2932 | { |
| 3003 | {"auto-raise", &Qauto_raise}, | 2933 | {"auto-raise", SYMBOL_INDEX (Qauto_raise)}, |
| 3004 | {"auto-lower", &Qauto_lower}, | 2934 | {"auto-lower", SYMBOL_INDEX (Qauto_lower)}, |
| 3005 | {"background-color", 0}, | 2935 | {"background-color", -1}, |
| 3006 | {"border-color", &Qborder_color}, | 2936 | {"border-color", SYMBOL_INDEX (Qborder_color)}, |
| 3007 | {"border-width", &Qborder_width}, | 2937 | {"border-width", SYMBOL_INDEX (Qborder_width)}, |
| 3008 | {"cursor-color", &Qcursor_color}, | 2938 | {"cursor-color", SYMBOL_INDEX (Qcursor_color)}, |
| 3009 | {"cursor-type", &Qcursor_type}, | 2939 | {"cursor-type", SYMBOL_INDEX (Qcursor_type)}, |
| 3010 | {"font", 0}, | 2940 | {"font", -1}, |
| 3011 | {"foreground-color", 0}, | 2941 | {"foreground-color", -1}, |
| 3012 | {"icon-name", &Qicon_name}, | 2942 | {"icon-name", SYMBOL_INDEX (Qicon_name)}, |
| 3013 | {"icon-type", &Qicon_type}, | 2943 | {"icon-type", SYMBOL_INDEX (Qicon_type)}, |
| 3014 | {"internal-border-width", &Qinternal_border_width}, | 2944 | {"internal-border-width", SYMBOL_INDEX (Qinternal_border_width)}, |
| 3015 | {"right-divider-width", &Qright_divider_width}, | 2945 | {"right-divider-width", SYMBOL_INDEX (Qright_divider_width)}, |
| 3016 | {"bottom-divider-width", &Qbottom_divider_width}, | 2946 | {"bottom-divider-width", SYMBOL_INDEX (Qbottom_divider_width)}, |
| 3017 | {"menu-bar-lines", &Qmenu_bar_lines}, | 2947 | {"menu-bar-lines", SYMBOL_INDEX (Qmenu_bar_lines)}, |
| 3018 | {"mouse-color", &Qmouse_color}, | 2948 | {"mouse-color", SYMBOL_INDEX (Qmouse_color)}, |
| 3019 | {"name", &Qname}, | 2949 | {"name", SYMBOL_INDEX (Qname)}, |
| 3020 | {"scroll-bar-width", &Qscroll_bar_width}, | 2950 | {"scroll-bar-width", SYMBOL_INDEX (Qscroll_bar_width)}, |
| 3021 | {"scroll-bar-height", &Qscroll_bar_height}, | 2951 | {"scroll-bar-height", SYMBOL_INDEX (Qscroll_bar_height)}, |
| 3022 | {"title", &Qtitle}, | 2952 | {"title", SYMBOL_INDEX (Qtitle)}, |
| 3023 | {"unsplittable", &Qunsplittable}, | 2953 | {"unsplittable", SYMBOL_INDEX (Qunsplittable)}, |
| 3024 | {"vertical-scroll-bars", &Qvertical_scroll_bars}, | 2954 | {"vertical-scroll-bars", SYMBOL_INDEX (Qvertical_scroll_bars)}, |
| 3025 | {"horizontal-scroll-bars", &Qhorizontal_scroll_bars}, | 2955 | {"horizontal-scroll-bars", SYMBOL_INDEX (Qhorizontal_scroll_bars)}, |
| 3026 | {"visibility", &Qvisibility}, | 2956 | {"visibility", SYMBOL_INDEX (Qvisibility)}, |
| 3027 | {"tool-bar-lines", &Qtool_bar_lines}, | 2957 | {"tool-bar-lines", SYMBOL_INDEX (Qtool_bar_lines)}, |
| 3028 | {"scroll-bar-foreground", &Qscroll_bar_foreground}, | 2958 | {"scroll-bar-foreground", SYMBOL_INDEX (Qscroll_bar_foreground)}, |
| 3029 | {"scroll-bar-background", &Qscroll_bar_background}, | 2959 | {"scroll-bar-background", SYMBOL_INDEX (Qscroll_bar_background)}, |
| 3030 | {"screen-gamma", &Qscreen_gamma}, | 2960 | {"screen-gamma", SYMBOL_INDEX (Qscreen_gamma)}, |
| 3031 | {"line-spacing", &Qline_spacing}, | 2961 | {"line-spacing", SYMBOL_INDEX (Qline_spacing)}, |
| 3032 | {"left-fringe", &Qleft_fringe}, | 2962 | {"left-fringe", SYMBOL_INDEX (Qleft_fringe)}, |
| 3033 | {"right-fringe", &Qright_fringe}, | 2963 | {"right-fringe", SYMBOL_INDEX (Qright_fringe)}, |
| 3034 | {"wait-for-wm", &Qwait_for_wm}, | 2964 | {"wait-for-wm", SYMBOL_INDEX (Qwait_for_wm)}, |
| 3035 | {"fullscreen", &Qfullscreen}, | 2965 | {"fullscreen", SYMBOL_INDEX (Qfullscreen)}, |
| 3036 | {"font-backend", &Qfont_backend}, | 2966 | {"font-backend", SYMBOL_INDEX (Qfont_backend)}, |
| 3037 | {"alpha", &Qalpha}, | 2967 | {"alpha", SYMBOL_INDEX (Qalpha)}, |
| 3038 | {"sticky", &Qsticky}, | 2968 | {"sticky", SYMBOL_INDEX (Qsticky)}, |
| 3039 | {"tool-bar-position", &Qtool_bar_position}, | 2969 | {"tool-bar-position", SYMBOL_INDEX (Qtool_bar_position)}, |
| 3040 | }; | 2970 | }; |
| 3041 | 2971 | ||
| 3042 | #ifdef HAVE_WINDOW_SYSTEM | 2972 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -4854,17 +4784,49 @@ syms_of_frame (void) | |||
| 4854 | DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); | 4784 | DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); |
| 4855 | #endif | 4785 | #endif |
| 4856 | 4786 | ||
| 4787 | DEFSYM (Qalpha, "alpha"); | ||
| 4788 | DEFSYM (Qauto_lower, "auto-lower"); | ||
| 4789 | DEFSYM (Qauto_raise, "auto-raise"); | ||
| 4790 | DEFSYM (Qborder_color, "border-color"); | ||
| 4791 | DEFSYM (Qborder_width, "border-width"); | ||
| 4792 | DEFSYM (Qbottom_divider_width, "bottom-divider-width"); | ||
| 4793 | DEFSYM (Qcursor_color, "cursor-color"); | ||
| 4794 | DEFSYM (Qcursor_type, "cursor-type"); | ||
| 4795 | DEFSYM (Qfont_backend, "font-backend"); | ||
| 4796 | DEFSYM (Qfullscreen, "fullscreen"); | ||
| 4797 | DEFSYM (Qhorizontal_scroll_bars, "horizontal-scroll-bars"); | ||
| 4798 | DEFSYM (Qicon_name, "icon-name"); | ||
| 4799 | DEFSYM (Qicon_type, "icon-type"); | ||
| 4800 | DEFSYM (Qinternal_border_width, "internal-border-width"); | ||
| 4801 | DEFSYM (Qleft_fringe, "left-fringe"); | ||
| 4802 | DEFSYM (Qline_spacing, "line-spacing"); | ||
| 4803 | DEFSYM (Qmenu_bar_lines, "menu-bar-lines"); | ||
| 4804 | DEFSYM (Qmouse_color, "mouse-color"); | ||
| 4805 | DEFSYM (Qname, "name"); | ||
| 4806 | DEFSYM (Qright_divider_width, "right-divider-width"); | ||
| 4807 | DEFSYM (Qright_fringe, "right-fringe"); | ||
| 4808 | DEFSYM (Qscreen_gamma, "screen-gamma"); | ||
| 4809 | DEFSYM (Qscroll_bar_background, "scroll-bar-background"); | ||
| 4810 | DEFSYM (Qscroll_bar_foreground, "scroll-bar-foreground"); | ||
| 4811 | DEFSYM (Qscroll_bar_height, "scroll-bar-height"); | ||
| 4812 | DEFSYM (Qscroll_bar_width, "scroll-bar-width"); | ||
| 4813 | DEFSYM (Qsticky, "sticky"); | ||
| 4814 | DEFSYM (Qtitle, "title"); | ||
| 4815 | DEFSYM (Qtool_bar_lines, "tool-bar-lines"); | ||
| 4816 | DEFSYM (Qtool_bar_position, "tool-bar-position"); | ||
| 4817 | DEFSYM (Qunsplittable, "unsplittable"); | ||
| 4818 | DEFSYM (Qvertical_scroll_bars, "vertical-scroll-bars"); | ||
| 4819 | DEFSYM (Qvisibility, "visibility"); | ||
| 4820 | DEFSYM (Qwait_for_wm, "wait-for-wm"); | ||
| 4821 | |||
| 4857 | { | 4822 | { |
| 4858 | int i; | 4823 | int i; |
| 4859 | 4824 | ||
| 4860 | for (i = 0; i < ARRAYELTS (frame_parms); i++) | 4825 | for (i = 0; i < ARRAYELTS (frame_parms); i++) |
| 4861 | { | 4826 | { |
| 4862 | Lisp_Object v = intern_c_string (frame_parms[i].name); | 4827 | Lisp_Object v = (frame_parms[i].sym < 0 |
| 4863 | if (frame_parms[i].variable) | 4828 | ? intern_c_string (frame_parms[i].name) |
| 4864 | { | 4829 | : builtin_lisp_symbol (frame_parms[i].sym)); |
| 4865 | *frame_parms[i].variable = v; | ||
| 4866 | staticpro (frame_parms[i].variable); | ||
| 4867 | } | ||
| 4868 | Fput (v, Qx_frame_parameter, make_number (i)); | 4830 | Fput (v, Qx_frame_parameter, make_number (i)); |
| 4869 | } | 4831 | } |
| 4870 | } | 4832 | } |
diff --git a/src/frame.h b/src/frame.h index 80603ce5624..d1ed4d4a67e 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -1095,11 +1095,6 @@ SET_FRAME_VISIBLE (struct frame *f, int v) | |||
| 1095 | (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i)) | 1095 | (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i)) |
| 1096 | 1096 | ||
| 1097 | extern Lisp_Object selected_frame; | 1097 | extern Lisp_Object selected_frame; |
| 1098 | extern Lisp_Object Qframep, Qframe_live_p; | ||
| 1099 | extern Lisp_Object Qtty, Qtty_type; | ||
| 1100 | extern Lisp_Object Qtty_color_mode; | ||
| 1101 | extern Lisp_Object Qterminal; | ||
| 1102 | extern Lisp_Object Qnoelisp; | ||
| 1103 | 1098 | ||
| 1104 | extern struct frame *decode_window_system_frame (Lisp_Object); | 1099 | extern struct frame *decode_window_system_frame (Lisp_Object); |
| 1105 | extern struct frame *decode_live_frame (Lisp_Object); | 1100 | extern struct frame *decode_live_frame (Lisp_Object); |
| @@ -1344,51 +1339,6 @@ extern Lisp_Object Vframe_list; | |||
| 1344 | Frame Parameters | 1339 | Frame Parameters |
| 1345 | ***********************************************************************/ | 1340 | ***********************************************************************/ |
| 1346 | 1341 | ||
| 1347 | extern Lisp_Object Qauto_raise, Qauto_lower; | ||
| 1348 | extern Lisp_Object Qborder_color, Qborder_width; | ||
| 1349 | extern Lisp_Object Qbuffer_predicate; | ||
| 1350 | extern Lisp_Object Qcursor_color, Qcursor_type; | ||
| 1351 | extern Lisp_Object Qfont; | ||
| 1352 | extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top; | ||
| 1353 | extern Lisp_Object Qinternal_border_width; | ||
| 1354 | extern Lisp_Object Qright_divider_width, Qbottom_divider_width; | ||
| 1355 | extern Lisp_Object Qtooltip; | ||
| 1356 | extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; | ||
| 1357 | extern Lisp_Object Qmouse_color; | ||
| 1358 | extern Lisp_Object Qname, Qtitle; | ||
| 1359 | extern Lisp_Object Qparent_id; | ||
| 1360 | extern Lisp_Object Qunsplittable, Qvisibility; | ||
| 1361 | extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars; | ||
| 1362 | extern Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars; | ||
| 1363 | extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; | ||
| 1364 | extern Lisp_Object Qscreen_gamma; | ||
| 1365 | extern Lisp_Object Qline_spacing; | ||
| 1366 | extern Lisp_Object Qwait_for_wm; | ||
| 1367 | extern Lisp_Object Qfullscreen; | ||
| 1368 | extern Lisp_Object Qfullwidth, Qfullheight, Qfullboth, Qmaximized; | ||
| 1369 | extern Lisp_Object Qsticky; | ||
| 1370 | extern Lisp_Object Qfont_backend; | ||
| 1371 | extern Lisp_Object Qalpha; | ||
| 1372 | |||
| 1373 | extern Lisp_Object Qleft_fringe, Qright_fringe; | ||
| 1374 | extern Lisp_Object Qheight, Qwidth; | ||
| 1375 | extern Lisp_Object Qminibuffer, Qmodeline; | ||
| 1376 | extern Lisp_Object Qx, Qw32, Qpc, Qns; | ||
| 1377 | extern Lisp_Object Qvisible; | ||
| 1378 | extern Lisp_Object Qdisplay_type; | ||
| 1379 | |||
| 1380 | extern Lisp_Object Qx_resource_name; | ||
| 1381 | |||
| 1382 | extern Lisp_Object Qtop, Qbox, Qbottom; | ||
| 1383 | extern Lisp_Object Qdisplay; | ||
| 1384 | |||
| 1385 | extern Lisp_Object Qframe_position, Qframe_outer_size, Qframe_inner_size; | ||
| 1386 | extern Lisp_Object Qexternal_border_size, Qtitle_height; | ||
| 1387 | extern Lisp_Object Qmenu_bar_external, Qmenu_bar_size; | ||
| 1388 | extern Lisp_Object Qtool_bar_external, Qtool_bar_size; | ||
| 1389 | |||
| 1390 | extern Lisp_Object Qrun_hook_with_args; | ||
| 1391 | |||
| 1392 | #ifdef HAVE_WINDOW_SYSTEM | 1342 | #ifdef HAVE_WINDOW_SYSTEM |
| 1393 | 1343 | ||
| 1394 | /* The class of this X application. */ | 1344 | /* The class of this X application. */ |
| @@ -1399,7 +1349,6 @@ extern void x_set_scroll_bar_default_height (struct frame *); | |||
| 1399 | extern void x_set_offset (struct frame *, int, int, int); | 1349 | extern void x_set_offset (struct frame *, int, int, int); |
| 1400 | extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position); | 1350 | extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position); |
| 1401 | extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); | 1351 | extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); |
| 1402 | extern Lisp_Object Qface_set_after_frame_default; | ||
| 1403 | extern void x_set_frame_parameters (struct frame *, Lisp_Object); | 1352 | extern void x_set_frame_parameters (struct frame *, Lisp_Object); |
| 1404 | extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); | 1353 | extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); |
| 1405 | extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); | 1354 | extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); |
diff --git a/src/fringe.c b/src/fringe.c index 9d393f86f7e..c7262d19336 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -65,10 +65,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 65 | must specify physical bitmap symbols. | 65 | must specify physical bitmap symbols. |
| 66 | */ | 66 | */ |
| 67 | 67 | ||
| 68 | static Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow; | ||
| 69 | static Lisp_Object Qempty_line, Qtop_bottom; | ||
| 70 | static Lisp_Object Qhollow_small; | ||
| 71 | |||
| 72 | enum fringe_bitmap_align | 68 | enum fringe_bitmap_align |
| 73 | { | 69 | { |
| 74 | ALIGN_BITMAP_CENTER = 0, | 70 | ALIGN_BITMAP_CENTER = 0, |
diff --git a/src/ftfont.c b/src/ftfont.c index 81698066306..9707b6c1b71 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -38,12 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | #include "font.h" | 38 | #include "font.h" |
| 39 | #include "ftfont.h" | 39 | #include "ftfont.h" |
| 40 | 40 | ||
| 41 | /* Symbolic type of this font-driver. */ | ||
| 42 | static Lisp_Object Qfreetype; | ||
| 43 | |||
| 44 | /* Fontconfig's generic families and their aliases. */ | ||
| 45 | static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif; | ||
| 46 | |||
| 47 | /* Flag to tell if FcInit is already called or not. */ | 41 | /* Flag to tell if FcInit is already called or not. */ |
| 48 | static bool fc_initialized; | 42 | static bool fc_initialized; |
| 49 | 43 | ||
| @@ -2667,7 +2661,10 @@ ftfont_filter_properties (Lisp_Object font, Lisp_Object alist) | |||
| 2667 | void | 2661 | void |
| 2668 | syms_of_ftfont (void) | 2662 | syms_of_ftfont (void) |
| 2669 | { | 2663 | { |
| 2664 | /* Symbolic type of this font-driver. */ | ||
| 2670 | DEFSYM (Qfreetype, "freetype"); | 2665 | DEFSYM (Qfreetype, "freetype"); |
| 2666 | |||
| 2667 | /* Fontconfig's generic families and their aliases. */ | ||
| 2671 | DEFSYM (Qmonospace, "monospace"); | 2668 | DEFSYM (Qmonospace, "monospace"); |
| 2672 | DEFSYM (Qsans_serif, "sans-serif"); | 2669 | DEFSYM (Qsans_serif, "sans-serif"); |
| 2673 | DEFSYM (Qserif, "serif"); | 2670 | DEFSYM (Qserif, "serif"); |
diff --git a/src/ftxfont.c b/src/ftxfont.c index 52d844597ee..cd2bf3e7415 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -35,8 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | 35 | ||
| 36 | /* FTX font driver. */ | 36 | /* FTX font driver. */ |
| 37 | 37 | ||
| 38 | static Lisp_Object Qftx; | ||
| 39 | |||
| 40 | struct font_driver ftxfont_driver; | 38 | struct font_driver ftxfont_driver; |
| 41 | 39 | ||
| 42 | struct ftxfont_frame_data | 40 | struct ftxfont_frame_data |
diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 7434a373476..e03bec93541 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c | |||
| @@ -29,24 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include "process.h" | 29 | #include "process.h" |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | /* Subroutines. */ | ||
| 33 | static Lisp_Object Qgfile_add_watch; | ||
| 34 | static Lisp_Object Qgfile_rm_watch; | ||
| 35 | |||
| 36 | /* Filter objects. */ | ||
| 37 | static Lisp_Object Qwatch_mounts; /* G_FILE_MONITOR_WATCH_MOUNTS */ | ||
| 38 | static Lisp_Object Qsend_moved; /* G_FILE_MONITOR_SEND_MOVED */ | ||
| 39 | |||
| 40 | /* Event types. */ | ||
| 41 | static Lisp_Object Qchanged; /* G_FILE_MONITOR_EVENT_CHANGED */ | ||
| 42 | static Lisp_Object Qchanges_done_hint; /* G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT */ | ||
| 43 | static Lisp_Object Qdeleted; /* G_FILE_MONITOR_EVENT_DELETED */ | ||
| 44 | static Lisp_Object Qcreated; /* G_FILE_MONITOR_EVENT_CREATED */ | ||
| 45 | static Lisp_Object Qattribute_changed; /* G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED */ | ||
| 46 | static Lisp_Object Qpre_unmount; /* G_FILE_MONITOR_EVENT_PRE_UNMOUNT */ | ||
| 47 | static Lisp_Object Qunmounted; /* G_FILE_MONITOR_EVENT_UNMOUNTED */ | ||
| 48 | static Lisp_Object Qmoved; /* G_FILE_MONITOR_EVENT_MOVED */ | ||
| 49 | |||
| 50 | static Lisp_Object watch_list; | 32 | static Lisp_Object watch_list; |
| 51 | 33 | ||
| 52 | /* This is the callback function for arriving signals from | 34 | /* This is the callback function for arriving signals from |
| @@ -95,7 +77,7 @@ dir_monitor_callback (GFileMonitor *monitor, | |||
| 95 | } | 77 | } |
| 96 | 78 | ||
| 97 | /* Determine callback function. */ | 79 | /* Determine callback function. */ |
| 98 | monitor_object = XIL ((intptr_t) monitor); | 80 | monitor_object = make_pointer_integer (monitor); |
| 99 | eassert (INTEGERP (monitor_object)); | 81 | eassert (INTEGERP (monitor_object)); |
| 100 | watch_object = assq_no_quit (monitor_object, watch_list); | 82 | watch_object = assq_no_quit (monitor_object, watch_list); |
| 101 | 83 | ||
| @@ -164,7 +146,7 @@ FILE is the name of the file whose event is being reported. FILE1 | |||
| 164 | will be reported only in case of the 'moved' event. */) | 146 | will be reported only in case of the 'moved' event. */) |
| 165 | (Lisp_Object file, Lisp_Object flags, Lisp_Object callback) | 147 | (Lisp_Object file, Lisp_Object flags, Lisp_Object callback) |
| 166 | { | 148 | { |
| 167 | Lisp_Object watch_descriptor, watch_object; | 149 | Lisp_Object watch_object; |
| 168 | GFile *gfile; | 150 | GFile *gfile; |
| 169 | GFileMonitor *monitor; | 151 | GFileMonitor *monitor; |
| 170 | GFileMonitorFlags gflags = G_FILE_MONITOR_NONE; | 152 | GFileMonitorFlags gflags = G_FILE_MONITOR_NONE; |
| @@ -194,10 +176,9 @@ will be reported only in case of the 'moved' event. */) | |||
| 194 | if (! monitor) | 176 | if (! monitor) |
| 195 | xsignal2 (Qfile_notify_error, build_string ("Cannot watch file"), file); | 177 | xsignal2 (Qfile_notify_error, build_string ("Cannot watch file"), file); |
| 196 | 178 | ||
| 197 | /* On all known glib platforms, converting MONITOR directly to a | 179 | Lisp_Object watch_descriptor = make_pointer_integer (monitor); |
| 198 | Lisp_Object value results is a Lisp integer, which is safe. This | 180 | |
| 199 | assumption is dicey, though, so check it now. */ | 181 | /* Check the dicey assumption that make_pointer_integer is safe. */ |
| 200 | watch_descriptor = XIL ((intptr_t) monitor); | ||
| 201 | if (! INTEGERP (watch_descriptor)) | 182 | if (! INTEGERP (watch_descriptor)) |
| 202 | { | 183 | { |
| 203 | g_object_unref (monitor); | 184 | g_object_unref (monitor); |
| @@ -221,8 +202,6 @@ DEFUN ("gfile-rm-watch", Fgfile_rm_watch, Sgfile_rm_watch, 1, 1, 0, | |||
| 221 | WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */) | 202 | WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */) |
| 222 | (Lisp_Object watch_descriptor) | 203 | (Lisp_Object watch_descriptor) |
| 223 | { | 204 | { |
| 224 | intptr_t int_monitor; | ||
| 225 | GFileMonitor *monitor; | ||
| 226 | Lisp_Object watch_object = assq_no_quit (watch_descriptor, watch_list); | 205 | Lisp_Object watch_object = assq_no_quit (watch_descriptor, watch_list); |
| 227 | 206 | ||
| 228 | if (! CONSP (watch_object)) | 207 | if (! CONSP (watch_object)) |
| @@ -230,8 +209,7 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */) | |||
| 230 | watch_descriptor); | 209 | watch_descriptor); |
| 231 | 210 | ||
| 232 | eassert (INTEGERP (watch_descriptor)); | 211 | eassert (INTEGERP (watch_descriptor)); |
| 233 | int_monitor = XLI (watch_descriptor); | 212 | GFileMonitor *monitor = XINTPTR (watch_descriptor); |
| 234 | monitor = (GFileMonitor *) int_monitor; | ||
| 235 | if (!g_file_monitor_cancel (monitor)) | 213 | if (!g_file_monitor_cancel (monitor)) |
| 236 | xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"), | 214 | xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"), |
| 237 | watch_descriptor); | 215 | watch_descriptor); |
| @@ -258,23 +236,27 @@ globals_of_gfilenotify (void) | |||
| 258 | void | 236 | void |
| 259 | syms_of_gfilenotify (void) | 237 | syms_of_gfilenotify (void) |
| 260 | { | 238 | { |
| 261 | |||
| 262 | DEFSYM (Qgfile_add_watch, "gfile-add-watch"); | 239 | DEFSYM (Qgfile_add_watch, "gfile-add-watch"); |
| 263 | defsubr (&Sgfile_add_watch); | 240 | defsubr (&Sgfile_add_watch); |
| 264 | 241 | ||
| 265 | DEFSYM (Qgfile_rm_watch, "gfile-rm-watch"); | 242 | DEFSYM (Qgfile_rm_watch, "gfile-rm-watch"); |
| 266 | defsubr (&Sgfile_rm_watch); | 243 | defsubr (&Sgfile_rm_watch); |
| 267 | 244 | ||
| 268 | DEFSYM (Qwatch_mounts, "watch-mounts"); | 245 | /* Filter objects. */ |
| 269 | DEFSYM (Qsend_moved, "send-moved"); | 246 | DEFSYM (Qwatch_mounts, "watch-mounts"); /* G_FILE_MONITOR_WATCH_MOUNTS */ |
| 270 | DEFSYM (Qchanged, "changed"); | 247 | DEFSYM (Qsend_moved, "send-moved"); /* G_FILE_MONITOR_SEND_MOVED */ |
| 248 | |||
| 249 | /* Event types. */ | ||
| 250 | DEFSYM (Qchanged, "changed"); /* G_FILE_MONITOR_EVENT_CHANGED */ | ||
| 271 | DEFSYM (Qchanges_done_hint, "changes-done-hint"); | 251 | DEFSYM (Qchanges_done_hint, "changes-done-hint"); |
| 272 | DEFSYM (Qdeleted, "deleted"); | 252 | /* G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT */ |
| 273 | DEFSYM (Qcreated, "created"); | 253 | DEFSYM (Qdeleted, "deleted"); /* G_FILE_MONITOR_EVENT_DELETED */ |
| 254 | DEFSYM (Qcreated, "created"); /* G_FILE_MONITOR_EVENT_CREATED */ | ||
| 274 | DEFSYM (Qattribute_changed, "attribute-changed"); | 255 | DEFSYM (Qattribute_changed, "attribute-changed"); |
| 275 | DEFSYM (Qpre_unmount, "pre-unmount"); | 256 | /* G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED */ |
| 276 | DEFSYM (Qunmounted, "unmounted"); | 257 | DEFSYM (Qpre_unmount, "pre-unmount"); /* G_FILE_MONITOR_EVENT_PRE_UNMOUNT */ |
| 277 | DEFSYM (Qmoved, "moved"); | 258 | DEFSYM (Qunmounted, "unmounted"); /* G_FILE_MONITOR_EVENT_UNMOUNTED */ |
| 259 | DEFSYM (Qmoved, "moved"); /* G_FILE_MONITOR_EVENT_MOVED */ | ||
| 278 | 260 | ||
| 279 | staticpro (&watch_list); | 261 | staticpro (&watch_list); |
| 280 | 262 | ||
diff --git a/src/gnutls.c b/src/gnutls.c index 4d248f86878..75fe6149a55 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -35,28 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | 35 | ||
| 36 | static bool emacs_gnutls_handle_error (gnutls_session_t, int); | 36 | static bool emacs_gnutls_handle_error (gnutls_session_t, int); |
| 37 | 37 | ||
| 38 | static Lisp_Object Qgnutls_dll; | ||
| 39 | static Lisp_Object Qgnutls_code; | ||
| 40 | static Lisp_Object Qgnutls_anon, Qgnutls_x509pki; | ||
| 41 | static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again, | ||
| 42 | Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake; | ||
| 43 | static bool gnutls_global_initialized; | 38 | static bool gnutls_global_initialized; |
| 44 | 39 | ||
| 45 | /* The following are for the property list of `gnutls-boot'. */ | ||
| 46 | static Lisp_Object QCgnutls_bootprop_priority; | ||
| 47 | static Lisp_Object QCgnutls_bootprop_trustfiles; | ||
| 48 | static Lisp_Object QCgnutls_bootprop_keylist; | ||
| 49 | static Lisp_Object QCgnutls_bootprop_crlfiles; | ||
| 50 | static Lisp_Object QCgnutls_bootprop_callbacks; | ||
| 51 | static Lisp_Object QCgnutls_bootprop_loglevel; | ||
| 52 | static Lisp_Object QCgnutls_bootprop_hostname; | ||
| 53 | static Lisp_Object QCgnutls_bootprop_min_prime_bits; | ||
| 54 | static Lisp_Object QCgnutls_bootprop_verify_flags; | ||
| 55 | static Lisp_Object QCgnutls_bootprop_verify_error; | ||
| 56 | |||
| 57 | /* Callback keys for `gnutls-boot'. Unused currently. */ | ||
| 58 | static Lisp_Object QCgnutls_bootprop_callbacks_verify; | ||
| 59 | |||
| 60 | static void gnutls_log_function (int, const char *); | 40 | static void gnutls_log_function (int, const char *); |
| 61 | static void gnutls_log_function2 (int, const char *, const char *); | 41 | static void gnutls_log_function2 (int, const char *, const char *); |
| 62 | #ifdef HAVE_GNUTLS3 | 42 | #ifdef HAVE_GNUTLS3 |
| @@ -1656,13 +1636,14 @@ syms_of_gnutls (void) | |||
| 1656 | DEFSYM (Qgnutls_code, "gnutls-code"); | 1636 | DEFSYM (Qgnutls_code, "gnutls-code"); |
| 1657 | DEFSYM (Qgnutls_anon, "gnutls-anon"); | 1637 | DEFSYM (Qgnutls_anon, "gnutls-anon"); |
| 1658 | DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); | 1638 | DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); |
| 1639 | |||
| 1640 | /* The following are for the property list of 'gnutls-boot'. */ | ||
| 1659 | DEFSYM (QCgnutls_bootprop_hostname, ":hostname"); | 1641 | DEFSYM (QCgnutls_bootprop_hostname, ":hostname"); |
| 1660 | DEFSYM (QCgnutls_bootprop_priority, ":priority"); | 1642 | DEFSYM (QCgnutls_bootprop_priority, ":priority"); |
| 1661 | DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles"); | 1643 | DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles"); |
| 1662 | DEFSYM (QCgnutls_bootprop_keylist, ":keylist"); | 1644 | DEFSYM (QCgnutls_bootprop_keylist, ":keylist"); |
| 1663 | DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles"); | 1645 | DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles"); |
| 1664 | DEFSYM (QCgnutls_bootprop_callbacks, ":callbacks"); | 1646 | DEFSYM (QCgnutls_bootprop_callbacks, ":callbacks"); |
| 1665 | DEFSYM (QCgnutls_bootprop_callbacks_verify, "verify"); | ||
| 1666 | DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits"); | 1647 | DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits"); |
| 1667 | DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel"); | 1648 | DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel"); |
| 1668 | DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags"); | 1649 | DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags"); |
diff --git a/src/image.c b/src/image.c index 6240c64b201..5d08a890234 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -86,12 +86,6 @@ typedef struct w32_bitmap_record Bitmap_Record; | |||
| 86 | #define x_defined_color w32_defined_color | 86 | #define x_defined_color w32_defined_color |
| 87 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) | 87 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) |
| 88 | 88 | ||
| 89 | /* Versions of libpng, libgif, and libjpeg that we were compiled with, | ||
| 90 | or -1 if no PNG/GIF support was compiled in. This is tested by | ||
| 91 | w32-win.el to correctly set up the alist used to search for the | ||
| 92 | respective image libraries. */ | ||
| 93 | Lisp_Object Qlibpng_version, Qlibgif_version, Qlibjpeg_version; | ||
| 94 | |||
| 95 | #endif /* HAVE_NTGUI */ | 89 | #endif /* HAVE_NTGUI */ |
| 96 | 90 | ||
| 97 | #ifdef HAVE_NS | 91 | #ifdef HAVE_NS |
| @@ -110,11 +104,6 @@ typedef struct ns_bitmap_record Bitmap_Record; | |||
| 110 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes | 104 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes |
| 111 | #endif /* HAVE_NS */ | 105 | #endif /* HAVE_NS */ |
| 112 | 106 | ||
| 113 | |||
| 114 | /* The symbol `postscript' identifying images of this type. */ | ||
| 115 | |||
| 116 | static Lisp_Object Qpostscript; | ||
| 117 | |||
| 118 | static void x_disable_image (struct frame *, struct image *); | 107 | static void x_disable_image (struct frame *, struct image *); |
| 119 | static void x_edge_detection (struct frame *, struct image *, Lisp_Object, | 108 | static void x_edge_detection (struct frame *, struct image *, Lisp_Object, |
| 120 | Lisp_Object); | 109 | Lisp_Object); |
| @@ -126,8 +115,6 @@ static void free_color_table (void); | |||
| 126 | static unsigned long *colors_in_color_table (int *n); | 115 | static unsigned long *colors_in_color_table (int *n); |
| 127 | #endif | 116 | #endif |
| 128 | 117 | ||
| 129 | static Lisp_Object QCmax_width, QCmax_height; | ||
| 130 | |||
| 131 | /* Code to deal with bitmaps. Bitmaps are referenced by their bitmap | 118 | /* Code to deal with bitmaps. Bitmaps are referenced by their bitmap |
| 132 | id, which is just an int that this section returns. Bitmaps are | 119 | id, which is just an int that this section returns. Bitmaps are |
| 133 | reference counted so they can be shared among frames. | 120 | reference counted so they can be shared among frames. |
| @@ -537,24 +524,6 @@ x_create_bitmap_mask (struct frame *f, ptrdiff_t id) | |||
| 537 | 524 | ||
| 538 | static struct image_type *image_types; | 525 | static struct image_type *image_types; |
| 539 | 526 | ||
| 540 | /* The symbol `xbm' which is used as the type symbol for XBM images. */ | ||
| 541 | |||
| 542 | static Lisp_Object Qxbm; | ||
| 543 | |||
| 544 | /* Keywords. */ | ||
| 545 | |||
| 546 | Lisp_Object QCascent, QCmargin, QCrelief; | ||
| 547 | Lisp_Object QCconversion; | ||
| 548 | static Lisp_Object QCheuristic_mask; | ||
| 549 | static Lisp_Object QCcolor_symbols; | ||
| 550 | static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry; | ||
| 551 | static Lisp_Object QCcrop, QCrotation; | ||
| 552 | |||
| 553 | /* Other symbols. */ | ||
| 554 | |||
| 555 | static Lisp_Object Qcount, Qextension_data, Qdelay; | ||
| 556 | static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; | ||
| 557 | |||
| 558 | /* Forward function prototypes. */ | 527 | /* Forward function prototypes. */ |
| 559 | 528 | ||
| 560 | static struct image_type *lookup_image_type (Lisp_Object); | 529 | static struct image_type *lookup_image_type (Lisp_Object); |
| @@ -579,27 +548,29 @@ static struct image_type * | |||
| 579 | define_image_type (struct image_type *type) | 548 | define_image_type (struct image_type *type) |
| 580 | { | 549 | { |
| 581 | struct image_type *p = NULL; | 550 | struct image_type *p = NULL; |
| 582 | Lisp_Object target_type = *type->type; | 551 | int new_type = type->type; |
| 583 | bool type_valid = 1; | 552 | bool type_valid = true; |
| 584 | 553 | ||
| 585 | block_input (); | 554 | block_input (); |
| 586 | 555 | ||
| 587 | for (p = image_types; p; p = p->next) | 556 | for (p = image_types; p; p = p->next) |
| 588 | if (EQ (*p->type, target_type)) | 557 | if (p->type == new_type) |
| 589 | goto done; | 558 | goto done; |
| 590 | 559 | ||
| 591 | if (type->init) | 560 | if (type->init) |
| 592 | { | 561 | { |
| 593 | #if defined HAVE_NTGUI && defined WINDOWSNT | 562 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 594 | /* If we failed to load the library before, don't try again. */ | 563 | /* If we failed to load the library before, don't try again. */ |
| 595 | Lisp_Object tested = Fassq (target_type, Vlibrary_cache); | 564 | Lisp_Object tested = Fassq (builtin_lisp_symbol (new_type), |
| 565 | Vlibrary_cache); | ||
| 596 | if (CONSP (tested) && NILP (XCDR (tested))) | 566 | if (CONSP (tested) && NILP (XCDR (tested))) |
| 597 | type_valid = 0; | 567 | type_valid = false; |
| 598 | else | 568 | else |
| 599 | #endif | 569 | #endif |
| 600 | { | 570 | { |
| 601 | type_valid = type->init (); | 571 | type_valid = type->init (); |
| 602 | CACHE_IMAGE_TYPE (target_type, type_valid ? Qt : Qnil); | 572 | CACHE_IMAGE_TYPE (builtin_lisp_symbol (new_type), |
| 573 | type_valid ? Qt : Qnil); | ||
| 603 | } | 574 | } |
| 604 | } | 575 | } |
| 605 | 576 | ||
| @@ -1777,7 +1748,7 @@ lookup_image (struct frame *f, Lisp_Object spec) | |||
| 1777 | 1748 | ||
| 1778 | /* Do image transformations and compute masks, unless we | 1749 | /* Do image transformations and compute masks, unless we |
| 1779 | don't have the image yet. */ | 1750 | don't have the image yet. */ |
| 1780 | if (!EQ (*img->type->type, Qpostscript)) | 1751 | if (!EQ (builtin_lisp_symbol (img->type->type), Qpostscript)) |
| 1781 | postprocess_image (f, img); | 1752 | postprocess_image (f, img); |
| 1782 | } | 1753 | } |
| 1783 | 1754 | ||
| @@ -2362,7 +2333,7 @@ static const struct image_keyword xbm_format[XBM_LAST] = | |||
| 2362 | 2333 | ||
| 2363 | static struct image_type xbm_type = | 2334 | static struct image_type xbm_type = |
| 2364 | { | 2335 | { |
| 2365 | &Qxbm, | 2336 | SYMBOL_INDEX (Qxbm), |
| 2366 | xbm_image_p, | 2337 | xbm_image_p, |
| 2367 | xbm_load, | 2338 | xbm_load, |
| 2368 | x_clear_image, | 2339 | x_clear_image, |
| @@ -3121,9 +3092,6 @@ static bool xpm_load (struct frame *f, struct image *img); | |||
| 3121 | #endif /* HAVE_XPM */ | 3092 | #endif /* HAVE_XPM */ |
| 3122 | 3093 | ||
| 3123 | #if defined (HAVE_XPM) || defined (HAVE_NS) | 3094 | #if defined (HAVE_XPM) || defined (HAVE_NS) |
| 3124 | /* The symbol `xpm' identifying XPM-format images. */ | ||
| 3125 | |||
| 3126 | static Lisp_Object Qxpm; | ||
| 3127 | 3095 | ||
| 3128 | /* Indices of image specification fields in xpm_format, below. */ | 3096 | /* Indices of image specification fields in xpm_format, below. */ |
| 3129 | 3097 | ||
| @@ -3171,7 +3139,7 @@ static bool init_xpm_functions (void); | |||
| 3171 | 3139 | ||
| 3172 | static struct image_type xpm_type = | 3140 | static struct image_type xpm_type = |
| 3173 | { | 3141 | { |
| 3174 | &Qxpm, | 3142 | SYMBOL_INDEX (Qxpm), |
| 3175 | xpm_image_p, | 3143 | xpm_image_p, |
| 3176 | xpm_load, | 3144 | xpm_load, |
| 3177 | x_clear_image, | 3145 | x_clear_image, |
| @@ -5059,10 +5027,6 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how) | |||
| 5059 | static bool pbm_image_p (Lisp_Object object); | 5027 | static bool pbm_image_p (Lisp_Object object); |
| 5060 | static bool pbm_load (struct frame *f, struct image *img); | 5028 | static bool pbm_load (struct frame *f, struct image *img); |
| 5061 | 5029 | ||
| 5062 | /* The symbol `pbm' identifying images of this type. */ | ||
| 5063 | |||
| 5064 | static Lisp_Object Qpbm; | ||
| 5065 | |||
| 5066 | /* Indices of image specification fields in gs_format, below. */ | 5030 | /* Indices of image specification fields in gs_format, below. */ |
| 5067 | 5031 | ||
| 5068 | enum pbm_keyword_index | 5032 | enum pbm_keyword_index |
| @@ -5103,7 +5067,7 @@ static const struct image_keyword pbm_format[PBM_LAST] = | |||
| 5103 | 5067 | ||
| 5104 | static struct image_type pbm_type = | 5068 | static struct image_type pbm_type = |
| 5105 | { | 5069 | { |
| 5106 | &Qpbm, | 5070 | SYMBOL_INDEX (Qpbm), |
| 5107 | pbm_image_p, | 5071 | pbm_image_p, |
| 5108 | pbm_load, | 5072 | pbm_load, |
| 5109 | x_clear_image, | 5073 | x_clear_image, |
| @@ -5446,10 +5410,6 @@ pbm_load (struct frame *f, struct image *img) | |||
| 5446 | static bool png_image_p (Lisp_Object object); | 5410 | static bool png_image_p (Lisp_Object object); |
| 5447 | static bool png_load (struct frame *f, struct image *img); | 5411 | static bool png_load (struct frame *f, struct image *img); |
| 5448 | 5412 | ||
| 5449 | /* The symbol `png' identifying images of this type. */ | ||
| 5450 | |||
| 5451 | static Lisp_Object Qpng; | ||
| 5452 | |||
| 5453 | /* Indices of image specification fields in png_format, below. */ | 5413 | /* Indices of image specification fields in png_format, below. */ |
| 5454 | 5414 | ||
| 5455 | enum png_keyword_index | 5415 | enum png_keyword_index |
| @@ -5494,7 +5454,7 @@ static bool init_png_functions (void); | |||
| 5494 | 5454 | ||
| 5495 | static struct image_type png_type = | 5455 | static struct image_type png_type = |
| 5496 | { | 5456 | { |
| 5497 | &Qpng, | 5457 | SYMBOL_INDEX (Qpng), |
| 5498 | png_image_p, | 5458 | png_image_p, |
| 5499 | png_load, | 5459 | png_load, |
| 5500 | x_clear_image, | 5460 | x_clear_image, |
| @@ -6102,10 +6062,6 @@ png_load (struct frame *f, struct image *img) | |||
| 6102 | static bool jpeg_image_p (Lisp_Object object); | 6062 | static bool jpeg_image_p (Lisp_Object object); |
| 6103 | static bool jpeg_load (struct frame *f, struct image *img); | 6063 | static bool jpeg_load (struct frame *f, struct image *img); |
| 6104 | 6064 | ||
| 6105 | /* The symbol `jpeg' identifying images of this type. */ | ||
| 6106 | |||
| 6107 | static Lisp_Object Qjpeg; | ||
| 6108 | |||
| 6109 | /* Indices of image specification fields in gs_format, below. */ | 6065 | /* Indices of image specification fields in gs_format, below. */ |
| 6110 | 6066 | ||
| 6111 | enum jpeg_keyword_index | 6067 | enum jpeg_keyword_index |
| @@ -6150,7 +6106,7 @@ static bool init_jpeg_functions (void); | |||
| 6150 | 6106 | ||
| 6151 | static struct image_type jpeg_type = | 6107 | static struct image_type jpeg_type = |
| 6152 | { | 6108 | { |
| 6153 | &Qjpeg, | 6109 | SYMBOL_INDEX (Qjpeg), |
| 6154 | jpeg_image_p, | 6110 | jpeg_image_p, |
| 6155 | jpeg_load, | 6111 | jpeg_load, |
| 6156 | x_clear_image, | 6112 | x_clear_image, |
| @@ -6704,10 +6660,6 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6704 | static bool tiff_image_p (Lisp_Object object); | 6660 | static bool tiff_image_p (Lisp_Object object); |
| 6705 | static bool tiff_load (struct frame *f, struct image *img); | 6661 | static bool tiff_load (struct frame *f, struct image *img); |
| 6706 | 6662 | ||
| 6707 | /* The symbol `tiff' identifying images of this type. */ | ||
| 6708 | |||
| 6709 | static Lisp_Object Qtiff; | ||
| 6710 | |||
| 6711 | /* Indices of image specification fields in tiff_format, below. */ | 6663 | /* Indices of image specification fields in tiff_format, below. */ |
| 6712 | 6664 | ||
| 6713 | enum tiff_keyword_index | 6665 | enum tiff_keyword_index |
| @@ -6754,7 +6706,7 @@ static bool init_tiff_functions (void); | |||
| 6754 | 6706 | ||
| 6755 | static struct image_type tiff_type = | 6707 | static struct image_type tiff_type = |
| 6756 | { | 6708 | { |
| 6757 | &Qtiff, | 6709 | SYMBOL_INDEX (Qtiff), |
| 6758 | tiff_image_p, | 6710 | tiff_image_p, |
| 6759 | tiff_load, | 6711 | tiff_load, |
| 6760 | x_clear_image, | 6712 | x_clear_image, |
| @@ -7167,10 +7119,6 @@ static bool gif_image_p (Lisp_Object object); | |||
| 7167 | static bool gif_load (struct frame *f, struct image *img); | 7119 | static bool gif_load (struct frame *f, struct image *img); |
| 7168 | static void gif_clear_image (struct frame *f, struct image *img); | 7120 | static void gif_clear_image (struct frame *f, struct image *img); |
| 7169 | 7121 | ||
| 7170 | /* The symbol `gif' identifying images of this type. */ | ||
| 7171 | |||
| 7172 | static Lisp_Object Qgif; | ||
| 7173 | |||
| 7174 | /* Indices of image specification fields in gif_format, below. */ | 7122 | /* Indices of image specification fields in gif_format, below. */ |
| 7175 | 7123 | ||
| 7176 | enum gif_keyword_index | 7124 | enum gif_keyword_index |
| @@ -7217,7 +7165,7 @@ static bool init_gif_functions (void); | |||
| 7217 | 7165 | ||
| 7218 | static struct image_type gif_type = | 7166 | static struct image_type gif_type = |
| 7219 | { | 7167 | { |
| 7220 | &Qgif, | 7168 | SYMBOL_INDEX (Qgif), |
| 7221 | gif_image_p, | 7169 | gif_image_p, |
| 7222 | gif_load, | 7170 | gif_load, |
| 7223 | gif_clear_image, | 7171 | gif_clear_image, |
| @@ -7841,8 +7789,6 @@ compute_image_size (size_t width, size_t height, | |||
| 7841 | *d_height = desired_height; | 7789 | *d_height = desired_height; |
| 7842 | } | 7790 | } |
| 7843 | 7791 | ||
| 7844 | static Lisp_Object Qimagemagick; | ||
| 7845 | |||
| 7846 | static bool imagemagick_image_p (Lisp_Object); | 7792 | static bool imagemagick_image_p (Lisp_Object); |
| 7847 | static bool imagemagick_load (struct frame *, struct image *); | 7793 | static bool imagemagick_load (struct frame *, struct image *); |
| 7848 | static void imagemagick_clear_image (struct frame *, struct image *); | 7794 | static void imagemagick_clear_image (struct frame *, struct image *); |
| @@ -7906,7 +7852,7 @@ static bool init_imagemagick_functions (void); | |||
| 7906 | 7852 | ||
| 7907 | static struct image_type imagemagick_type = | 7853 | static struct image_type imagemagick_type = |
| 7908 | { | 7854 | { |
| 7909 | &Qimagemagick, | 7855 | SYMBOL_INDEX (Qimagemagick), |
| 7910 | imagemagick_image_p, | 7856 | imagemagick_image_p, |
| 7911 | imagemagick_load, | 7857 | imagemagick_load, |
| 7912 | imagemagick_clear_image, | 7858 | imagemagick_clear_image, |
| @@ -8632,10 +8578,6 @@ static bool svg_load (struct frame *f, struct image *img); | |||
| 8632 | static bool svg_load_image (struct frame *, struct image *, | 8578 | static bool svg_load_image (struct frame *, struct image *, |
| 8633 | unsigned char *, ptrdiff_t, char *); | 8579 | unsigned char *, ptrdiff_t, char *); |
| 8634 | 8580 | ||
| 8635 | /* The symbol `svg' identifying images of this type. */ | ||
| 8636 | |||
| 8637 | static Lisp_Object Qsvg; | ||
| 8638 | |||
| 8639 | /* Indices of image specification fields in svg_format, below. */ | 8581 | /* Indices of image specification fields in svg_format, below. */ |
| 8640 | 8582 | ||
| 8641 | enum svg_keyword_index | 8583 | enum svg_keyword_index |
| @@ -8682,7 +8624,7 @@ static bool init_svg_functions (void); | |||
| 8682 | 8624 | ||
| 8683 | static struct image_type svg_type = | 8625 | static struct image_type svg_type = |
| 8684 | { | 8626 | { |
| 8685 | &Qsvg, | 8627 | SYMBOL_INDEX (Qsvg), |
| 8686 | svg_image_p, | 8628 | svg_image_p, |
| 8687 | svg_load, | 8629 | svg_load, |
| 8688 | x_clear_image, | 8630 | x_clear_image, |
| @@ -8737,8 +8679,6 @@ DEF_DLL_FN (void, g_type_init, (void)); | |||
| 8737 | DEF_DLL_FN (void, g_object_unref, (gpointer)); | 8679 | DEF_DLL_FN (void, g_object_unref, (gpointer)); |
| 8738 | DEF_DLL_FN (void, g_error_free, (GError *)); | 8680 | DEF_DLL_FN (void, g_error_free, (GError *)); |
| 8739 | 8681 | ||
| 8740 | Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; | ||
| 8741 | |||
| 8742 | static bool | 8682 | static bool |
| 8743 | init_svg_functions (void) | 8683 | init_svg_functions (void) |
| 8744 | { | 8684 | { |
| @@ -9056,10 +8996,6 @@ static bool gs_image_p (Lisp_Object object); | |||
| 9056 | static bool gs_load (struct frame *f, struct image *img); | 8996 | static bool gs_load (struct frame *f, struct image *img); |
| 9057 | static void gs_clear_image (struct frame *f, struct image *img); | 8997 | static void gs_clear_image (struct frame *f, struct image *img); |
| 9058 | 8998 | ||
| 9059 | /* Keyword symbols. */ | ||
| 9060 | |||
| 9061 | static Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; | ||
| 9062 | |||
| 9063 | /* Indices of image specification fields in gs_format, below. */ | 8999 | /* Indices of image specification fields in gs_format, below. */ |
| 9064 | 9000 | ||
| 9065 | enum gs_keyword_index | 9001 | enum gs_keyword_index |
| @@ -9104,7 +9040,7 @@ static const struct image_keyword gs_format[GS_LAST] = | |||
| 9104 | 9040 | ||
| 9105 | static struct image_type gs_type = | 9041 | static struct image_type gs_type = |
| 9106 | { | 9042 | { |
| 9107 | &Qpostscript, | 9043 | SYMBOL_INDEX (Qpostscript), |
| 9108 | gs_image_p, | 9044 | gs_image_p, |
| 9109 | gs_load, | 9045 | gs_load, |
| 9110 | gs_clear_image, | 9046 | gs_clear_image, |
| @@ -9479,10 +9415,12 @@ as a ratio to the frame height and width. If the value is | |||
| 9479 | non-numeric, there is no explicit limit on the size of images. */); | 9415 | non-numeric, there is no explicit limit on the size of images. */); |
| 9480 | Vmax_image_size = make_float (MAX_IMAGE_SIZE); | 9416 | Vmax_image_size = make_float (MAX_IMAGE_SIZE); |
| 9481 | 9417 | ||
| 9418 | /* Other symbols. */ | ||
| 9482 | DEFSYM (Qcount, "count"); | 9419 | DEFSYM (Qcount, "count"); |
| 9483 | DEFSYM (Qextension_data, "extension-data"); | 9420 | DEFSYM (Qextension_data, "extension-data"); |
| 9484 | DEFSYM (Qdelay, "delay"); | 9421 | DEFSYM (Qdelay, "delay"); |
| 9485 | 9422 | ||
| 9423 | /* Keywords. */ | ||
| 9486 | DEFSYM (QCascent, ":ascent"); | 9424 | DEFSYM (QCascent, ":ascent"); |
| 9487 | DEFSYM (QCmargin, ":margin"); | 9425 | DEFSYM (QCmargin, ":margin"); |
| 9488 | DEFSYM (QCrelief, ":relief"); | 9426 | DEFSYM (QCrelief, ":relief"); |
| @@ -9497,6 +9435,7 @@ non-numeric, there is no explicit limit on the size of images. */); | |||
| 9497 | DEFSYM (QCcolor_adjustment, ":color-adjustment"); | 9435 | DEFSYM (QCcolor_adjustment, ":color-adjustment"); |
| 9498 | DEFSYM (QCmask, ":mask"); | 9436 | DEFSYM (QCmask, ":mask"); |
| 9499 | 9437 | ||
| 9438 | /* Other symbols. */ | ||
| 9500 | DEFSYM (Qlaplace, "laplace"); | 9439 | DEFSYM (Qlaplace, "laplace"); |
| 9501 | DEFSYM (Qemboss, "emboss"); | 9440 | DEFSYM (Qemboss, "emboss"); |
| 9502 | DEFSYM (Qedge_detection, "edge-detection"); | 9441 | DEFSYM (Qedge_detection, "edge-detection"); |
| @@ -9514,6 +9453,10 @@ non-numeric, there is no explicit limit on the size of images. */); | |||
| 9514 | #endif /* HAVE_GHOSTSCRIPT */ | 9453 | #endif /* HAVE_GHOSTSCRIPT */ |
| 9515 | 9454 | ||
| 9516 | #ifdef HAVE_NTGUI | 9455 | #ifdef HAVE_NTGUI |
| 9456 | /* Versions of libpng, libgif, and libjpeg that we were compiled with, | ||
| 9457 | or -1 if no PNG/GIF support was compiled in. This is tested by | ||
| 9458 | w32-win.el to correctly set up the alist used to search for the | ||
| 9459 | respective image libraries. */ | ||
| 9517 | DEFSYM (Qlibpng_version, "libpng-version"); | 9460 | DEFSYM (Qlibpng_version, "libpng-version"); |
| 9518 | Fset (Qlibpng_version, | 9461 | Fset (Qlibpng_version, |
| 9519 | #if HAVE_PNG | 9462 | #if HAVE_PNG |
diff --git a/src/inotify.c b/src/inotify.c index 8e8ab202c41..eddad73e8f7 100644 --- a/src/inotify.c +++ b/src/inotify.c | |||
| @@ -29,34 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include "frame.h" /* Required for termhooks.h. */ | 29 | #include "frame.h" /* Required for termhooks.h. */ |
| 30 | #include "termhooks.h" | 30 | #include "termhooks.h" |
| 31 | 31 | ||
| 32 | static Lisp_Object Qaccess; /* IN_ACCESS */ | ||
| 33 | static Lisp_Object Qattrib; /* IN_ATTRIB */ | ||
| 34 | static Lisp_Object Qclose_write; /* IN_CLOSE_WRITE */ | ||
| 35 | static Lisp_Object Qclose_nowrite; /* IN_CLOSE_NOWRITE */ | ||
| 36 | static Lisp_Object Qcreate; /* IN_CREATE */ | ||
| 37 | static Lisp_Object Qdelete; /* IN_DELETE */ | ||
| 38 | static Lisp_Object Qdelete_self; /* IN_DELETE_SELF */ | ||
| 39 | static Lisp_Object Qmodify; /* IN_MODIFY */ | ||
| 40 | static Lisp_Object Qmove_self; /* IN_MOVE_SELF */ | ||
| 41 | static Lisp_Object Qmoved_from; /* IN_MOVED_FROM */ | ||
| 42 | static Lisp_Object Qmoved_to; /* IN_MOVED_TO */ | ||
| 43 | static Lisp_Object Qopen; /* IN_OPEN */ | ||
| 44 | |||
| 45 | static Lisp_Object Qall_events; /* IN_ALL_EVENTS */ | ||
| 46 | static Lisp_Object Qmove; /* IN_MOVE */ | ||
| 47 | static Lisp_Object Qclose; /* IN_CLOSE */ | ||
| 48 | |||
| 49 | static Lisp_Object Qdont_follow; /* IN_DONT_FOLLOW */ | ||
| 50 | static Lisp_Object Qexcl_unlink; /* IN_EXCL_UNLINK */ | ||
| 51 | static Lisp_Object Qmask_add; /* IN_MASK_ADD */ | ||
| 52 | static Lisp_Object Qoneshot; /* IN_ONESHOT */ | ||
| 53 | static Lisp_Object Qonlydir; /* IN_ONLYDIR */ | ||
| 54 | |||
| 55 | static Lisp_Object Qignored; /* IN_IGNORED */ | ||
| 56 | static Lisp_Object Qisdir; /* IN_ISDIR */ | ||
| 57 | static Lisp_Object Qq_overflow; /* IN_Q_OVERFLOW */ | ||
| 58 | static Lisp_Object Qunmount; /* IN_UNMOUNT */ | ||
| 59 | |||
| 60 | #include <sys/inotify.h> | 32 | #include <sys/inotify.h> |
| 61 | #include <sys/ioctl.h> | 33 | #include <sys/ioctl.h> |
| 62 | 34 | ||
| @@ -398,33 +370,34 @@ See inotify_rm_watch(2) for more information. | |||
| 398 | void | 370 | void |
| 399 | syms_of_inotify (void) | 371 | syms_of_inotify (void) |
| 400 | { | 372 | { |
| 401 | DEFSYM (Qaccess, "access"); | 373 | DEFSYM (Qaccess, "access"); /* IN_ACCESS */ |
| 402 | DEFSYM (Qattrib, "attrib"); | 374 | DEFSYM (Qattrib, "attrib"); /* IN_ATTRIB */ |
| 403 | DEFSYM (Qclose_write, "close-write"); | 375 | DEFSYM (Qclose_write, "close-write"); /* IN_CLOSE_WRITE */ |
| 404 | DEFSYM (Qclose_nowrite, "close-nowrite"); | 376 | DEFSYM (Qclose_nowrite, "close-nowrite"); |
| 405 | DEFSYM (Qcreate, "create"); | 377 | /* IN_CLOSE_NOWRITE */ |
| 406 | DEFSYM (Qdelete, "delete"); | 378 | DEFSYM (Qcreate, "create"); /* IN_CREATE */ |
| 407 | DEFSYM (Qdelete_self, "delete-self"); | 379 | DEFSYM (Qdelete, "delete"); /* IN_DELETE */ |
| 408 | DEFSYM (Qmodify, "modify"); | 380 | DEFSYM (Qdelete_self, "delete-self"); /* IN_DELETE_SELF */ |
| 409 | DEFSYM (Qmove_self, "move-self"); | 381 | DEFSYM (Qmodify, "modify"); /* IN_MODIFY */ |
| 410 | DEFSYM (Qmoved_from, "moved-from"); | 382 | DEFSYM (Qmove_self, "move-self"); /* IN_MOVE_SELF */ |
| 411 | DEFSYM (Qmoved_to, "moved-to"); | 383 | DEFSYM (Qmoved_from, "moved-from"); /* IN_MOVED_FROM */ |
| 412 | DEFSYM (Qopen, "open"); | 384 | DEFSYM (Qmoved_to, "moved-to"); /* IN_MOVED_TO */ |
| 413 | 385 | DEFSYM (Qopen, "open"); /* IN_OPEN */ | |
| 414 | DEFSYM (Qall_events, "all-events"); | 386 | |
| 415 | DEFSYM (Qmove, "move"); | 387 | DEFSYM (Qall_events, "all-events"); /* IN_ALL_EVENTS */ |
| 416 | DEFSYM (Qclose, "close"); | 388 | DEFSYM (Qmove, "move"); /* IN_MOVE */ |
| 417 | 389 | DEFSYM (Qclose, "close"); /* IN_CLOSE */ | |
| 418 | DEFSYM (Qdont_follow, "dont-follow"); | 390 | |
| 419 | DEFSYM (Qexcl_unlink, "excl-unlink"); | 391 | DEFSYM (Qdont_follow, "dont-follow"); /* IN_DONT_FOLLOW */ |
| 420 | DEFSYM (Qmask_add, "mask-add"); | 392 | DEFSYM (Qexcl_unlink, "excl-unlink"); /* IN_EXCL_UNLINK */ |
| 421 | DEFSYM (Qoneshot, "oneshot"); | 393 | DEFSYM (Qmask_add, "mask-add"); /* IN_MASK_ADD */ |
| 422 | DEFSYM (Qonlydir, "onlydir"); | 394 | DEFSYM (Qoneshot, "oneshot"); /* IN_ONESHOT */ |
| 423 | 395 | DEFSYM (Qonlydir, "onlydir"); /* IN_ONLYDIR */ | |
| 424 | DEFSYM (Qignored, "ignored"); | 396 | |
| 425 | DEFSYM (Qisdir, "isdir"); | 397 | DEFSYM (Qignored, "ignored"); /* IN_IGNORED */ |
| 426 | DEFSYM (Qq_overflow, "q-overflow"); | 398 | DEFSYM (Qisdir, "isdir"); /* IN_ISDIR */ |
| 427 | DEFSYM (Qunmount, "unmount"); | 399 | DEFSYM (Qq_overflow, "q-overflow"); /* IN_Q_OVERFLOW */ |
| 400 | DEFSYM (Qunmount, "unmount"); /* IN_UNMOUNT */ | ||
| 428 | 401 | ||
| 429 | defsubr (&Sinotify_add_watch); | 402 | defsubr (&Sinotify_add_watch); |
| 430 | defsubr (&Sinotify_rm_watch); | 403 | defsubr (&Sinotify_rm_watch); |
diff --git a/src/insdel.c b/src/insdel.c index a1bec4a9a6d..4463721b897 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -52,8 +52,6 @@ static Lisp_Object combine_after_change_list; | |||
| 52 | /* Buffer which combine_after_change_list is about. */ | 52 | /* Buffer which combine_after_change_list is about. */ |
| 53 | static Lisp_Object combine_after_change_buffer; | 53 | static Lisp_Object combine_after_change_buffer; |
| 54 | 54 | ||
| 55 | Lisp_Object Qinhibit_modification_hooks; | ||
| 56 | |||
| 57 | static void signal_before_change (ptrdiff_t, ptrdiff_t, ptrdiff_t *); | 55 | static void signal_before_change (ptrdiff_t, ptrdiff_t, ptrdiff_t *); |
| 58 | 56 | ||
| 59 | /* Also used in marker.c to enable expensive marker checks. */ | 57 | /* Also used in marker.c to enable expensive marker checks. */ |
| @@ -1781,8 +1779,6 @@ modify_text (ptrdiff_t start, ptrdiff_t end) | |||
| 1781 | bset_point_before_scroll (current_buffer, Qnil); | 1779 | bset_point_before_scroll (current_buffer, Qnil); |
| 1782 | } | 1780 | } |
| 1783 | 1781 | ||
| 1784 | Lisp_Object Qregion_extract_function; | ||
| 1785 | |||
| 1786 | /* Check that it is okay to modify the buffer between START and END, | 1782 | /* Check that it is okay to modify the buffer between START and END, |
| 1787 | which are char positions. | 1783 | which are char positions. |
| 1788 | 1784 | ||
| @@ -1995,7 +1991,7 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int, | |||
| 1995 | { | 1991 | { |
| 1996 | PRESERVE_VALUE; | 1992 | PRESERVE_VALUE; |
| 1997 | PRESERVE_START_END; | 1993 | PRESERVE_START_END; |
| 1998 | Frun_hooks (1, &Qfirst_change_hook); | 1994 | run_hook (Qfirst_change_hook); |
| 1999 | } | 1995 | } |
| 2000 | 1996 | ||
| 2001 | /* Now run the before-change-functions if any. */ | 1997 | /* Now run the before-change-functions if any. */ |
diff --git a/src/intervals.h b/src/intervals.h index 8f0f3482ea5..b2260d002e6 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -271,21 +271,7 @@ extern INTERVAL interval_of (ptrdiff_t, Lisp_Object); | |||
| 271 | /* Defined in xdisp.c. */ | 271 | /* Defined in xdisp.c. */ |
| 272 | extern int invisible_p (Lisp_Object, Lisp_Object); | 272 | extern int invisible_p (Lisp_Object, Lisp_Object); |
| 273 | 273 | ||
| 274 | /* Declared in textprop.c. */ | 274 | /* Defined in textprop.c. */ |
| 275 | |||
| 276 | /* Types of hooks. */ | ||
| 277 | extern Lisp_Object Qpoint_left; | ||
| 278 | extern Lisp_Object Qpoint_entered; | ||
| 279 | extern Lisp_Object Qmodification_hooks; | ||
| 280 | extern Lisp_Object Qcategory; | ||
| 281 | extern Lisp_Object Qlocal_map; | ||
| 282 | |||
| 283 | /* Visual properties text (including strings) may have. */ | ||
| 284 | extern Lisp_Object Qinvisible, Qintangible; | ||
| 285 | |||
| 286 | /* Sticky properties. */ | ||
| 287 | extern Lisp_Object Qfront_sticky, Qrear_nonsticky; | ||
| 288 | |||
| 289 | extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object, | 275 | extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object, |
| 290 | Lisp_Object, Lisp_Object, | 276 | Lisp_Object, Lisp_Object, |
| 291 | Lisp_Object, Lisp_Object); | 277 | Lisp_Object, Lisp_Object); |
diff --git a/src/keyboard.c b/src/keyboard.c index 9261c4b09fd..86c840d052a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -88,11 +88,6 @@ static KBOARD *all_kboards; | |||
| 88 | /* True in the single-kboard state, false in the any-kboard state. */ | 88 | /* True in the single-kboard state, false in the any-kboard state. */ |
| 89 | static bool single_kboard; | 89 | static bool single_kboard; |
| 90 | 90 | ||
| 91 | /* Non-nil disable property on a command means | ||
| 92 | do not execute it; call disabled-command-function's value instead. */ | ||
| 93 | Lisp_Object Qdisabled; | ||
| 94 | static Lisp_Object Qdisabled_command_function; | ||
| 95 | |||
| 96 | #define NUM_RECENT_KEYS (300) | 91 | #define NUM_RECENT_KEYS (300) |
| 97 | 92 | ||
| 98 | /* Index for storing next element into recent_keys. */ | 93 | /* Index for storing next element into recent_keys. */ |
| @@ -232,42 +227,11 @@ static ptrdiff_t last_point_position; | |||
| 232 | 'volatile' here. */ | 227 | 'volatile' here. */ |
| 233 | Lisp_Object internal_last_event_frame; | 228 | Lisp_Object internal_last_event_frame; |
| 234 | 229 | ||
| 235 | static Lisp_Object Qgui_set_selection, Qhandle_switch_frame; | ||
| 236 | static Lisp_Object Qhandle_select_window; | ||
| 237 | Lisp_Object QPRIMARY; | ||
| 238 | |||
| 239 | static Lisp_Object Qself_insert_command; | ||
| 240 | static Lisp_Object Qforward_char; | ||
| 241 | static Lisp_Object Qbackward_char; | ||
| 242 | Lisp_Object Qundefined; | ||
| 243 | static Lisp_Object Qtimer_event_handler; | ||
| 244 | |||
| 245 | /* `read_key_sequence' stores here the command definition of the | 230 | /* `read_key_sequence' stores here the command definition of the |
| 246 | key sequence that it reads. */ | 231 | key sequence that it reads. */ |
| 247 | static Lisp_Object read_key_sequence_cmd; | 232 | static Lisp_Object read_key_sequence_cmd; |
| 248 | static Lisp_Object read_key_sequence_remapped; | 233 | static Lisp_Object read_key_sequence_remapped; |
| 249 | 234 | ||
| 250 | static Lisp_Object Qinput_method_function; | ||
| 251 | |||
| 252 | static Lisp_Object Qdeactivate_mark; | ||
| 253 | |||
| 254 | Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; | ||
| 255 | |||
| 256 | static Lisp_Object Qecho_area_clear_hook; | ||
| 257 | |||
| 258 | /* Hooks to run before and after each command. */ | ||
| 259 | static Lisp_Object Qpre_command_hook; | ||
| 260 | static Lisp_Object Qpost_command_hook; | ||
| 261 | |||
| 262 | static Lisp_Object Qdeferred_action_function; | ||
| 263 | |||
| 264 | static Lisp_Object Qdelayed_warnings_hook; | ||
| 265 | |||
| 266 | static Lisp_Object Qinput_method_exit_on_first_char; | ||
| 267 | static Lisp_Object Qinput_method_use_echo_area; | ||
| 268 | |||
| 269 | static Lisp_Object Qhelp_form_show; | ||
| 270 | |||
| 271 | /* File in which we write all commands we read. */ | 235 | /* File in which we write all commands we read. */ |
| 272 | static FILE *dribble; | 236 | static FILE *dribble; |
| 273 | 237 | ||
| @@ -346,86 +310,12 @@ static struct input_event * volatile kbd_store_ptr; | |||
| 346 | dequeuing functions? Such a flag could be screwed up by interrupts | 310 | dequeuing functions? Such a flag could be screwed up by interrupts |
| 347 | at inopportune times. */ | 311 | at inopportune times. */ |
| 348 | 312 | ||
| 349 | /* Symbols to head events. */ | ||
| 350 | static Lisp_Object Qmouse_movement; | ||
| 351 | static Lisp_Object Qscroll_bar_movement; | ||
| 352 | Lisp_Object Qswitch_frame; | ||
| 353 | static Lisp_Object Qfocus_in, Qfocus_out; | ||
| 354 | static Lisp_Object Qdelete_frame; | ||
| 355 | static Lisp_Object Qiconify_frame; | ||
| 356 | static Lisp_Object Qmake_frame_visible; | ||
| 357 | static Lisp_Object Qselect_window; | ||
| 358 | Lisp_Object Qhelp_echo; | ||
| 359 | |||
| 360 | static Lisp_Object Qmouse_fixup_help_message; | ||
| 361 | |||
| 362 | /* Symbols to denote kinds of events. */ | ||
| 363 | static Lisp_Object Qfunction_key; | ||
| 364 | Lisp_Object Qmouse_click; | ||
| 365 | #ifdef HAVE_NTGUI | ||
| 366 | Lisp_Object Qlanguage_change; | ||
| 367 | #endif | ||
| 368 | static Lisp_Object Qdrag_n_drop; | ||
| 369 | static Lisp_Object Qsave_session; | ||
| 370 | #ifdef HAVE_DBUS | ||
| 371 | static Lisp_Object Qdbus_event; | ||
| 372 | #endif | ||
| 373 | #ifdef HAVE_XWIDGETS | ||
| 374 | Lisp_Object Qxwidget_event; | ||
| 375 | #endif | ||
| 376 | #ifdef USE_FILE_NOTIFY | ||
| 377 | static Lisp_Object Qfile_notify; | ||
| 378 | #endif /* USE_FILE_NOTIFY */ | ||
| 379 | static Lisp_Object Qconfig_changed_event; | ||
| 380 | |||
| 381 | /* Lisp_Object Qmouse_movement; - also an event header */ | ||
| 382 | |||
| 383 | /* Properties of event headers. */ | ||
| 384 | Lisp_Object Qevent_kind; | ||
| 385 | static Lisp_Object Qevent_symbol_elements; | ||
| 386 | |||
| 387 | /* Menu and tool bar item parts. */ | ||
| 388 | static Lisp_Object Qmenu_enable; | ||
| 389 | static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence; | ||
| 390 | Lisp_Object QCfilter; | ||
| 391 | |||
| 392 | /* Non-nil disable property on a command means | ||
| 393 | do not execute it; call disabled-command-function's value instead. */ | ||
| 394 | Lisp_Object QCtoggle, QCradio; | ||
| 395 | static Lisp_Object QCbutton, QClabel; | ||
| 396 | |||
| 397 | static Lisp_Object QCvert_only; | ||
| 398 | |||
| 399 | /* An event header symbol HEAD may have a property named | ||
| 400 | Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); | ||
| 401 | BASE is the base, unmodified version of HEAD, and MODIFIERS is the | ||
| 402 | mask of modifiers applied to it. If present, this is used to help | ||
| 403 | speed up parse_modifiers. */ | ||
| 404 | Lisp_Object Qevent_symbol_element_mask; | ||
| 405 | |||
| 406 | /* An unmodified event header BASE may have a property named | ||
| 407 | Qmodifier_cache, which is an alist mapping modifier masks onto | ||
| 408 | modified versions of BASE. If present, this helps speed up | ||
| 409 | apply_modifiers. */ | ||
| 410 | static Lisp_Object Qmodifier_cache; | ||
| 411 | |||
| 412 | /* Symbols to use for parts of windows. */ | ||
| 413 | Lisp_Object Qmode_line; | ||
| 414 | Lisp_Object Qvertical_line; | ||
| 415 | Lisp_Object Qright_divider, Qbottom_divider; | ||
| 416 | Lisp_Object Qmenu_bar; | ||
| 417 | |||
| 418 | static Lisp_Object Qecho_keystrokes; | ||
| 419 | |||
| 420 | static void recursive_edit_unwind (Lisp_Object buffer); | 313 | static void recursive_edit_unwind (Lisp_Object buffer); |
| 421 | static Lisp_Object command_loop (void); | 314 | static Lisp_Object command_loop (void); |
| 422 | static Lisp_Object Qcommand_execute; | ||
| 423 | 315 | ||
| 424 | static void echo_now (void); | 316 | static void echo_now (void); |
| 425 | static ptrdiff_t echo_length (void); | 317 | static ptrdiff_t echo_length (void); |
| 426 | 318 | ||
| 427 | static Lisp_Object Qpolling_period; | ||
| 428 | |||
| 429 | /* Incremented whenever a timer is run. */ | 319 | /* Incremented whenever a timer is run. */ |
| 430 | unsigned timers_run; | 320 | unsigned timers_run; |
| 431 | 321 | ||
| @@ -1716,10 +1606,7 @@ command_loop_1 (void) | |||
| 1716 | } | 1606 | } |
| 1717 | 1607 | ||
| 1718 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) | 1608 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) |
| 1719 | { | 1609 | run_hook (intern ("activate-mark-hook")); |
| 1720 | Lisp_Object hook = intern ("activate-mark-hook"); | ||
| 1721 | Frun_hooks (1, &hook); | ||
| 1722 | } | ||
| 1723 | } | 1610 | } |
| 1724 | 1611 | ||
| 1725 | Vsaved_region_selection = Qnil; | 1612 | Vsaved_region_selection = Qnil; |
| @@ -4138,11 +4025,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4138 | { | 4025 | { |
| 4139 | #ifdef HAVE_W32NOTIFY | 4026 | #ifdef HAVE_W32NOTIFY |
| 4140 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ | 4027 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ |
| 4141 | obj = list3 (Qfile_notify, | 4028 | obj = list3 (Qfile_notify, event->arg, event->frame_or_window); |
| 4142 | list3 (make_number (event->code), | ||
| 4143 | XCAR (event->arg), | ||
| 4144 | XCDR (event->arg)), | ||
| 4145 | event->frame_or_window); | ||
| 4146 | #else | 4029 | #else |
| 4147 | obj = make_lispy_event (event); | 4030 | obj = make_lispy_event (event); |
| 4148 | #endif | 4031 | #endif |
| @@ -5295,22 +5178,17 @@ static const char *const lispy_drag_n_drop_names[] = | |||
| 5295 | "drag-n-drop" | 5178 | "drag-n-drop" |
| 5296 | }; | 5179 | }; |
| 5297 | 5180 | ||
| 5298 | /* Scroll bar parts. */ | 5181 | /* An array of symbol indexes of scroll bar parts, indexed by an enum |
| 5299 | static Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; | 5182 | scroll_bar_part value. Note that Qnil corresponds to |
| 5300 | static Lisp_Object Qbefore_handle, Qhorizontal_handle, Qafter_handle; | 5183 | scroll_bar_nowhere and should not appear in Lisp events. */ |
| 5301 | Lisp_Object Qup, Qdown, Qtop, Qbottom; | 5184 | static short const scroll_bar_parts[] = { |
| 5302 | static Lisp_Object Qleftmost, Qrightmost; | 5185 | SYMBOL_INDEX (Qnil), SYMBOL_INDEX (Qabove_handle), SYMBOL_INDEX (Qhandle), |
| 5303 | static Lisp_Object Qend_scroll; | 5186 | SYMBOL_INDEX (Qbelow_handle), SYMBOL_INDEX (Qup), SYMBOL_INDEX (Qdown), |
| 5304 | static Lisp_Object Qratio; | 5187 | SYMBOL_INDEX (Qtop), SYMBOL_INDEX (Qbottom), SYMBOL_INDEX (Qend_scroll), |
| 5305 | 5188 | SYMBOL_INDEX (Qratio), SYMBOL_INDEX (Qbefore_handle), | |
| 5306 | /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. | 5189 | SYMBOL_INDEX (Qhorizontal_handle), SYMBOL_INDEX (Qafter_handle), |
| 5307 | Note that Qnil corresponds to scroll_bar_nowhere and should not appear | 5190 | SYMBOL_INDEX (Qleft), SYMBOL_INDEX (Qright), SYMBOL_INDEX (Qleftmost), |
| 5308 | in Lisp events. */ | 5191 | SYMBOL_INDEX (Qrightmost), SYMBOL_INDEX (Qend_scroll), SYMBOL_INDEX (Qratio) |
| 5309 | static Lisp_Object *const scroll_bar_parts[] = { | ||
| 5310 | &Qnil, &Qabove_handle, &Qhandle, &Qbelow_handle, | ||
| 5311 | &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio, | ||
| 5312 | &Qbefore_handle, &Qhorizontal_handle, &Qafter_handle, | ||
| 5313 | &Qleft, &Qright, &Qleftmost, &Qrightmost, &Qend_scroll, &Qratio | ||
| 5314 | }; | 5192 | }; |
| 5315 | 5193 | ||
| 5316 | /* A vector, indexed by button number, giving the down-going location | 5194 | /* A vector, indexed by button number, giving the down-going location |
| @@ -5583,7 +5461,8 @@ static Lisp_Object | |||
| 5583 | make_scroll_bar_position (struct input_event *ev, Lisp_Object type) | 5461 | make_scroll_bar_position (struct input_event *ev, Lisp_Object type) |
| 5584 | { | 5462 | { |
| 5585 | return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y), | 5463 | return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y), |
| 5586 | make_number (ev->timestamp), *scroll_bar_parts[ev->part]); | 5464 | make_number (ev->timestamp), |
| 5465 | builtin_lisp_symbol (scroll_bar_parts[ev->part])); | ||
| 5587 | } | 5466 | } |
| 5588 | 5467 | ||
| 5589 | /* Given a struct input_event, build the lisp event which represents | 5468 | /* Given a struct input_event, build the lisp event which represents |
| @@ -6231,7 +6110,7 @@ make_lispy_movement (struct frame *frame, Lisp_Object bar_window, enum scroll_ba | |||
| 6231 | { | 6110 | { |
| 6232 | Lisp_Object part_sym; | 6111 | Lisp_Object part_sym; |
| 6233 | 6112 | ||
| 6234 | part_sym = *scroll_bar_parts[(int) part]; | 6113 | part_sym = builtin_lisp_symbol (scroll_bar_parts[part]); |
| 6235 | return list2 (Qscroll_bar_movement, | 6114 | return list2 (Qscroll_bar_movement, |
| 6236 | list5 (bar_window, | 6115 | list5 (bar_window, |
| 6237 | Qvertical_scroll_bar, | 6116 | Qvertical_scroll_bar, |
| @@ -8095,11 +7974,6 @@ static Lisp_Object tool_bar_item_properties; | |||
| 8095 | 7974 | ||
| 8096 | static int ntool_bar_items; | 7975 | static int ntool_bar_items; |
| 8097 | 7976 | ||
| 8098 | /* The symbols `:image' and `:rtl'. */ | ||
| 8099 | |||
| 8100 | static Lisp_Object QCimage; | ||
| 8101 | static Lisp_Object QCrtl; | ||
| 8102 | |||
| 8103 | /* Function prototypes. */ | 7977 | /* Function prototypes. */ |
| 8104 | 7978 | ||
| 8105 | static void init_tool_bar_items (Lisp_Object); | 7979 | static void init_tool_bar_items (Lisp_Object); |
| @@ -10358,7 +10232,6 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10358 | int old_height, old_width; | 10232 | int old_height, old_width; |
| 10359 | int width, height; | 10233 | int width, height; |
| 10360 | struct gcpro gcpro1; | 10234 | struct gcpro gcpro1; |
| 10361 | Lisp_Object hook; | ||
| 10362 | 10235 | ||
| 10363 | if (tty_list && tty_list->next) | 10236 | if (tty_list && tty_list->next) |
| 10364 | error ("There are other tty frames open; close them before suspending Emacs"); | 10237 | error ("There are other tty frames open; close them before suspending Emacs"); |
| @@ -10366,9 +10239,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10366 | if (!NILP (stuffstring)) | 10239 | if (!NILP (stuffstring)) |
| 10367 | CHECK_STRING (stuffstring); | 10240 | CHECK_STRING (stuffstring); |
| 10368 | 10241 | ||
| 10369 | /* Run the functions in suspend-hook. */ | 10242 | run_hook (intern ("suspend-hook")); |
| 10370 | hook = intern ("suspend-hook"); | ||
| 10371 | Frun_hooks (1, &hook); | ||
| 10372 | 10243 | ||
| 10373 | GCPRO1 (stuffstring); | 10244 | GCPRO1 (stuffstring); |
| 10374 | get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); | 10245 | get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); |
| @@ -10392,9 +10263,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10392 | height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()), | 10263 | height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()), |
| 10393 | 0, 0, 0, 0); | 10264 | 0, 0, 0, 0); |
| 10394 | 10265 | ||
| 10395 | /* Run suspend-resume-hook. */ | 10266 | run_hook (intern ("suspend-resume-hook")); |
| 10396 | hook = intern ("suspend-resume-hook"); | ||
| 10397 | Frun_hooks (1, &hook); | ||
| 10398 | 10267 | ||
| 10399 | UNGCPRO; | 10268 | UNGCPRO; |
| 10400 | return Qnil; | 10269 | return Qnil; |
| @@ -11138,26 +11007,29 @@ init_keyboard (void) | |||
| 11138 | #endif | 11007 | #endif |
| 11139 | } | 11008 | } |
| 11140 | 11009 | ||
| 11141 | /* This type's only use is in syms_of_keyboard, to initialize the | 11010 | /* This type's only use is in syms_of_keyboard, to put properties on the |
| 11142 | event header symbols and put properties on them. */ | 11011 | event header symbols. */ |
| 11143 | struct event_head { | 11012 | struct event_head |
| 11144 | Lisp_Object *var; | 11013 | { |
| 11145 | const char *name; | 11014 | short var; |
| 11146 | Lisp_Object *kind; | 11015 | short kind; |
| 11147 | }; | 11016 | }; |
| 11148 | 11017 | ||
| 11149 | static const struct event_head head_table[] = { | 11018 | static const struct event_head head_table[] = { |
| 11150 | {&Qmouse_movement, "mouse-movement", &Qmouse_movement}, | 11019 | {SYMBOL_INDEX (Qmouse_movement), SYMBOL_INDEX (Qmouse_movement)}, |
| 11151 | {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement}, | 11020 | {SYMBOL_INDEX (Qscroll_bar_movement), SYMBOL_INDEX (Qmouse_movement)}, |
| 11152 | {&Qswitch_frame, "switch-frame", &Qswitch_frame}, | 11021 | |
| 11153 | {&Qfocus_in, "focus-in", &Qfocus_in}, | 11022 | /* Some of the event heads. */ |
| 11154 | {&Qfocus_out, "focus-out", &Qfocus_out}, | 11023 | {SYMBOL_INDEX (Qswitch_frame), SYMBOL_INDEX (Qswitch_frame)}, |
| 11155 | {&Qdelete_frame, "delete-frame", &Qdelete_frame}, | 11024 | |
| 11156 | {&Qiconify_frame, "iconify-frame", &Qiconify_frame}, | 11025 | {SYMBOL_INDEX (Qfocus_in), SYMBOL_INDEX (Qfocus_in)}, |
| 11157 | {&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible}, | 11026 | {SYMBOL_INDEX (Qfocus_out), SYMBOL_INDEX (Qfocus_out)}, |
| 11027 | {SYMBOL_INDEX (Qdelete_frame), SYMBOL_INDEX (Qdelete_frame)}, | ||
| 11028 | {SYMBOL_INDEX (Qiconify_frame), SYMBOL_INDEX (Qiconify_frame)}, | ||
| 11029 | {SYMBOL_INDEX (Qmake_frame_visible), SYMBOL_INDEX (Qmake_frame_visible)}, | ||
| 11158 | /* `select-window' should be handled just like `switch-frame' | 11030 | /* `select-window' should be handled just like `switch-frame' |
| 11159 | in read_key_sequence. */ | 11031 | in read_key_sequence. */ |
| 11160 | {&Qselect_window, "select-window", &Qswitch_frame} | 11032 | {SYMBOL_INDEX (Qselect_window), SYMBOL_INDEX (Qswitch_frame)} |
| 11161 | }; | 11033 | }; |
| 11162 | 11034 | ||
| 11163 | void | 11035 | void |
| @@ -11196,17 +11068,29 @@ syms_of_keyboard (void) | |||
| 11196 | DEFSYM (Qself_insert_command, "self-insert-command"); | 11068 | DEFSYM (Qself_insert_command, "self-insert-command"); |
| 11197 | DEFSYM (Qforward_char, "forward-char"); | 11069 | DEFSYM (Qforward_char, "forward-char"); |
| 11198 | DEFSYM (Qbackward_char, "backward-char"); | 11070 | DEFSYM (Qbackward_char, "backward-char"); |
| 11071 | |||
| 11072 | /* Non-nil disable property on a command means do not execute it; | ||
| 11073 | call disabled-command-function's value instead. */ | ||
| 11199 | DEFSYM (Qdisabled, "disabled"); | 11074 | DEFSYM (Qdisabled, "disabled"); |
| 11075 | |||
| 11200 | DEFSYM (Qundefined, "undefined"); | 11076 | DEFSYM (Qundefined, "undefined"); |
| 11077 | |||
| 11078 | /* Hooks to run before and after each command. */ | ||
| 11201 | DEFSYM (Qpre_command_hook, "pre-command-hook"); | 11079 | DEFSYM (Qpre_command_hook, "pre-command-hook"); |
| 11202 | DEFSYM (Qpost_command_hook, "post-command-hook"); | 11080 | DEFSYM (Qpost_command_hook, "post-command-hook"); |
| 11081 | |||
| 11203 | DEFSYM (Qdeferred_action_function, "deferred-action-function"); | 11082 | DEFSYM (Qdeferred_action_function, "deferred-action-function"); |
| 11204 | DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); | 11083 | DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); |
| 11205 | DEFSYM (Qfunction_key, "function-key"); | 11084 | DEFSYM (Qfunction_key, "function-key"); |
| 11085 | |||
| 11086 | /* The values of Qevent_kind properties. */ | ||
| 11206 | DEFSYM (Qmouse_click, "mouse-click"); | 11087 | DEFSYM (Qmouse_click, "mouse-click"); |
| 11088 | |||
| 11207 | DEFSYM (Qdrag_n_drop, "drag-n-drop"); | 11089 | DEFSYM (Qdrag_n_drop, "drag-n-drop"); |
| 11208 | DEFSYM (Qsave_session, "save-session"); | 11090 | DEFSYM (Qsave_session, "save-session"); |
| 11209 | DEFSYM (Qconfig_changed_event, "config-changed-event"); | 11091 | DEFSYM (Qconfig_changed_event, "config-changed-event"); |
| 11092 | |||
| 11093 | /* Menu and tool bar item parts. */ | ||
| 11210 | DEFSYM (Qmenu_enable, "menu-enable"); | 11094 | DEFSYM (Qmenu_enable, "menu-enable"); |
| 11211 | 11095 | ||
| 11212 | #ifdef HAVE_NTGUI | 11096 | #ifdef HAVE_NTGUI |
| @@ -11225,6 +11109,7 @@ syms_of_keyboard (void) | |||
| 11225 | DEFSYM (Qfile_notify, "file-notify"); | 11109 | DEFSYM (Qfile_notify, "file-notify"); |
| 11226 | #endif /* USE_FILE_NOTIFY */ | 11110 | #endif /* USE_FILE_NOTIFY */ |
| 11227 | 11111 | ||
| 11112 | /* Menu and tool bar item parts. */ | ||
| 11228 | DEFSYM (QCenable, ":enable"); | 11113 | DEFSYM (QCenable, ":enable"); |
| 11229 | DEFSYM (QCvisible, ":visible"); | 11114 | DEFSYM (QCvisible, ":visible"); |
| 11230 | DEFSYM (QChelp, ":help"); | 11115 | DEFSYM (QChelp, ":help"); |
| @@ -11232,14 +11117,16 @@ syms_of_keyboard (void) | |||
| 11232 | DEFSYM (QCbutton, ":button"); | 11117 | DEFSYM (QCbutton, ":button"); |
| 11233 | DEFSYM (QCkeys, ":keys"); | 11118 | DEFSYM (QCkeys, ":keys"); |
| 11234 | DEFSYM (QCkey_sequence, ":key-sequence"); | 11119 | DEFSYM (QCkey_sequence, ":key-sequence"); |
| 11120 | |||
| 11121 | /* Non-nil disable property on a command means | ||
| 11122 | do not execute it; call disabled-command-function's value instead. */ | ||
| 11235 | DEFSYM (QCtoggle, ":toggle"); | 11123 | DEFSYM (QCtoggle, ":toggle"); |
| 11236 | DEFSYM (QCradio, ":radio"); | 11124 | DEFSYM (QCradio, ":radio"); |
| 11237 | DEFSYM (QClabel, ":label"); | 11125 | DEFSYM (QClabel, ":label"); |
| 11238 | DEFSYM (QCvert_only, ":vert-only"); | 11126 | DEFSYM (QCvert_only, ":vert-only"); |
| 11239 | 11127 | ||
| 11240 | DEFSYM (Qmode_line, "mode-line"); | 11128 | /* Symbols to use for parts of windows. */ |
| 11241 | DEFSYM (Qvertical_line, "vertical-line"); | 11129 | DEFSYM (Qvertical_line, "vertical-line"); |
| 11242 | DEFSYM (Qmenu_bar, "menu-bar"); | ||
| 11243 | DEFSYM (Qright_divider, "right-divider"); | 11130 | DEFSYM (Qright_divider, "right-divider"); |
| 11244 | DEFSYM (Qbottom_divider, "bottom-divider"); | 11131 | DEFSYM (Qbottom_divider, "bottom-divider"); |
| 11245 | 11132 | ||
| @@ -11262,9 +11149,21 @@ syms_of_keyboard (void) | |||
| 11262 | DEFSYM (Qleftmost, "leftmost"); | 11149 | DEFSYM (Qleftmost, "leftmost"); |
| 11263 | DEFSYM (Qrightmost, "rightmost"); | 11150 | DEFSYM (Qrightmost, "rightmost"); |
| 11264 | 11151 | ||
| 11152 | /* Properties of event headers. */ | ||
| 11265 | DEFSYM (Qevent_kind, "event-kind"); | 11153 | DEFSYM (Qevent_kind, "event-kind"); |
| 11266 | DEFSYM (Qevent_symbol_elements, "event-symbol-elements"); | 11154 | DEFSYM (Qevent_symbol_elements, "event-symbol-elements"); |
| 11155 | |||
| 11156 | /* An event header symbol HEAD may have a property named | ||
| 11157 | Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); | ||
| 11158 | BASE is the base, unmodified version of HEAD, and MODIFIERS is the | ||
| 11159 | mask of modifiers applied to it. If present, this is used to help | ||
| 11160 | speed up parse_modifiers. */ | ||
| 11267 | DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask"); | 11161 | DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask"); |
| 11162 | |||
| 11163 | /* An unmodified event header BASE may have a property named | ||
| 11164 | Qmodifier_cache, which is an alist mapping modifier masks onto | ||
| 11165 | modified versions of BASE. If present, this helps speed up | ||
| 11166 | apply_modifiers. */ | ||
| 11268 | DEFSYM (Qmodifier_cache, "modifier-cache"); | 11167 | DEFSYM (Qmodifier_cache, "modifier-cache"); |
| 11269 | 11168 | ||
| 11270 | DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar"); | 11169 | DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar"); |
| @@ -11273,7 +11172,10 @@ syms_of_keyboard (void) | |||
| 11273 | DEFSYM (Qpolling_period, "polling-period"); | 11172 | DEFSYM (Qpolling_period, "polling-period"); |
| 11274 | 11173 | ||
| 11275 | DEFSYM (Qgui_set_selection, "gui-set-selection"); | 11174 | DEFSYM (Qgui_set_selection, "gui-set-selection"); |
| 11175 | |||
| 11176 | /* The primary selection. */ | ||
| 11276 | DEFSYM (QPRIMARY, "PRIMARY"); | 11177 | DEFSYM (QPRIMARY, "PRIMARY"); |
| 11178 | |||
| 11277 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); | 11179 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); |
| 11278 | DEFSYM (Qhandle_select_window, "handle-select-window"); | 11180 | DEFSYM (Qhandle_select_window, "handle-select-window"); |
| 11279 | 11181 | ||
| @@ -11288,17 +11190,26 @@ syms_of_keyboard (void) | |||
| 11288 | Fset (Qinput_method_exit_on_first_char, Qnil); | 11190 | Fset (Qinput_method_exit_on_first_char, Qnil); |
| 11289 | Fset (Qinput_method_use_echo_area, Qnil); | 11191 | Fset (Qinput_method_use_echo_area, Qnil); |
| 11290 | 11192 | ||
| 11193 | /* Symbols to head events. */ | ||
| 11194 | DEFSYM (Qmouse_movement, "mouse-movement"); | ||
| 11195 | DEFSYM (Qscroll_bar_movement, "scroll-bar-movement"); | ||
| 11196 | DEFSYM (Qswitch_frame, "switch-frame"); | ||
| 11197 | DEFSYM (Qfocus_in, "focus-in"); | ||
| 11198 | DEFSYM (Qfocus_out, "focus-out"); | ||
| 11199 | DEFSYM (Qdelete_frame, "delete-frame"); | ||
| 11200 | DEFSYM (Qiconify_frame, "iconify-frame"); | ||
| 11201 | DEFSYM (Qmake_frame_visible, "make-frame-visible"); | ||
| 11202 | DEFSYM (Qselect_window, "select-window"); | ||
| 11291 | { | 11203 | { |
| 11292 | int i; | 11204 | int i; |
| 11293 | int len = ARRAYELTS (head_table); | ||
| 11294 | 11205 | ||
| 11295 | for (i = 0; i < len; i++) | 11206 | for (i = 0; i < ARRAYELTS (head_table); i++) |
| 11296 | { | 11207 | { |
| 11297 | const struct event_head *p = &head_table[i]; | 11208 | const struct event_head *p = &head_table[i]; |
| 11298 | *p->var = intern_c_string (p->name); | 11209 | Lisp_Object var = builtin_lisp_symbol (p->var); |
| 11299 | staticpro (p->var); | 11210 | Lisp_Object kind = builtin_lisp_symbol (p->kind); |
| 11300 | Fput (*p->var, Qevent_kind, *p->kind); | 11211 | Fput (var, Qevent_kind, kind); |
| 11301 | Fput (*p->var, Qevent_symbol_elements, list1 (*p->var)); | 11212 | Fput (var, Qevent_symbol_elements, list1 (var)); |
| 11302 | } | 11213 | } |
| 11303 | } | 11214 | } |
| 11304 | 11215 | ||
| @@ -11624,13 +11535,13 @@ with no modifiers; thus, setting `extra-keyboard-modifiers' to zero | |||
| 11624 | cancels any modification. */); | 11535 | cancels any modification. */); |
| 11625 | extra_keyboard_modifiers = 0; | 11536 | extra_keyboard_modifiers = 0; |
| 11626 | 11537 | ||
| 11538 | DEFSYM (Qdeactivate_mark, "deactivate-mark"); | ||
| 11627 | DEFVAR_LISP ("deactivate-mark", Vdeactivate_mark, | 11539 | DEFVAR_LISP ("deactivate-mark", Vdeactivate_mark, |
| 11628 | doc: /* If an editing command sets this to t, deactivate the mark afterward. | 11540 | doc: /* If an editing command sets this to t, deactivate the mark afterward. |
| 11629 | The command loop sets this to nil before each command, | 11541 | The command loop sets this to nil before each command, |
| 11630 | and tests the value when the command returns. | 11542 | and tests the value when the command returns. |
| 11631 | Buffer modification stores t in this variable. */); | 11543 | Buffer modification stores t in this variable. */); |
| 11632 | Vdeactivate_mark = Qnil; | 11544 | Vdeactivate_mark = Qnil; |
| 11633 | DEFSYM (Qdeactivate_mark, "deactivate-mark"); | ||
| 11634 | Fmake_variable_buffer_local (Qdeactivate_mark); | 11545 | Fmake_variable_buffer_local (Qdeactivate_mark); |
| 11635 | 11546 | ||
| 11636 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, | 11547 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, |
diff --git a/src/keyboard.h b/src/keyboard.h index 534e2018a52..0ce6d184482 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -248,8 +248,6 @@ extern ptrdiff_t this_command_key_count; | |||
| 248 | generated by the next character. */ | 248 | generated by the next character. */ |
| 249 | extern Lisp_Object internal_last_event_frame; | 249 | extern Lisp_Object internal_last_event_frame; |
| 250 | 250 | ||
| 251 | extern Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; | ||
| 252 | |||
| 253 | /* This holds a Lisp vector that holds the properties of a single | 251 | /* This holds a Lisp vector that holds the properties of a single |
| 254 | menu item while decoding it in parse_menu_item. | 252 | menu item while decoding it in parse_menu_item. |
| 255 | Using a Lisp vector to hold this information while we decode it | 253 | Using a Lisp vector to hold this information while we decode it |
| @@ -387,25 +385,10 @@ extern void unuse_menu_items (void); | |||
| 387 | #define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) | 385 | #define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) |
| 388 | #define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) | 386 | #define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) |
| 389 | 387 | ||
| 390 | /* Some of the event heads. */ | ||
| 391 | extern Lisp_Object Qswitch_frame; | ||
| 392 | |||
| 393 | /* Properties on event heads. */ | ||
| 394 | extern Lisp_Object Qevent_kind; | ||
| 395 | |||
| 396 | /* The values of Qevent_kind properties. */ | ||
| 397 | extern Lisp_Object Qmouse_click; | ||
| 398 | |||
| 399 | extern Lisp_Object Qhelp_echo; | ||
| 400 | |||
| 401 | /* Getting the kind of an event head. */ | 388 | /* Getting the kind of an event head. */ |
| 402 | #define EVENT_HEAD_KIND(event_head) \ | 389 | #define EVENT_HEAD_KIND(event_head) \ |
| 403 | (Fget ((event_head), Qevent_kind)) | 390 | (Fget ((event_head), Qevent_kind)) |
| 404 | 391 | ||
| 405 | /* Symbols to use for non-text mouse positions. */ | ||
| 406 | extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line; | ||
| 407 | extern Lisp_Object Qright_divider, Qbottom_divider; | ||
| 408 | |||
| 409 | /* True while doing kbd input. */ | 392 | /* True while doing kbd input. */ |
| 410 | extern bool waiting_for_input; | 393 | extern bool waiting_for_input; |
| 411 | 394 | ||
| @@ -415,9 +398,6 @@ extern struct timespec *input_available_clear_time; | |||
| 415 | 398 | ||
| 416 | extern bool ignore_mouse_drag_p; | 399 | extern bool ignore_mouse_drag_p; |
| 417 | 400 | ||
| 418 | /* The primary selection. */ | ||
| 419 | extern Lisp_Object QPRIMARY; | ||
| 420 | |||
| 421 | extern Lisp_Object parse_modifiers (Lisp_Object); | 401 | extern Lisp_Object parse_modifiers (Lisp_Object); |
| 422 | extern Lisp_Object reorder_modifiers (Lisp_Object); | 402 | extern Lisp_Object reorder_modifiers (Lisp_Object); |
| 423 | extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, | 403 | extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, |
| @@ -428,17 +408,6 @@ extern int parse_solitary_modifier (Lisp_Object symbol); | |||
| 428 | /* This is like Vthis_command, except that commands never set it. */ | 408 | /* This is like Vthis_command, except that commands never set it. */ |
| 429 | extern Lisp_Object real_this_command; | 409 | extern Lisp_Object real_this_command; |
| 430 | 410 | ||
| 431 | /* Non-nil disable property on a command means | ||
| 432 | do not execute it; call disabled-command-function's value instead. */ | ||
| 433 | extern Lisp_Object QCtoggle, QCradio; | ||
| 434 | |||
| 435 | /* An event header symbol HEAD may have a property named | ||
| 436 | Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); | ||
| 437 | BASE is the base, unmodified version of HEAD, and MODIFIERS is the | ||
| 438 | mask of modifiers applied to it. If present, this is used to help | ||
| 439 | speed up parse_modifiers. */ | ||
| 440 | extern Lisp_Object Qevent_symbol_element_mask; | ||
| 441 | |||
| 442 | extern int quit_char; | 411 | extern int quit_char; |
| 443 | 412 | ||
| 444 | extern unsigned int timers_run; | 413 | extern unsigned int timers_run; |
diff --git a/src/keymap.c b/src/keymap.c index ab21a226271..9c7b4d29a3e 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -76,12 +76,6 @@ Lisp_Object control_x_map; /* The keymap used for globally bound | |||
| 76 | bindings when spaces are not encouraged | 76 | bindings when spaces are not encouraged |
| 77 | in the minibuf. */ | 77 | in the minibuf. */ |
| 78 | 78 | ||
| 79 | /* Keymap used for minibuffers when doing completion. */ | ||
| 80 | /* Keymap used for minibuffers when doing completion and require a match. */ | ||
| 81 | static Lisp_Object Qkeymapp, Qnon_ascii; | ||
| 82 | Lisp_Object Qkeymap, Qmenu_item, Qremap; | ||
| 83 | static Lisp_Object QCadvertised_binding; | ||
| 84 | |||
| 85 | /* Alist of elements like (DEL . "\d"). */ | 79 | /* Alist of elements like (DEL . "\d"). */ |
| 86 | static Lisp_Object exclude_keys; | 80 | static Lisp_Object exclude_keys; |
| 87 | 81 | ||
| @@ -654,8 +648,6 @@ map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, | |||
| 654 | UNGCPRO; | 648 | UNGCPRO; |
| 655 | } | 649 | } |
| 656 | 650 | ||
| 657 | static Lisp_Object Qkeymap_canonicalize; | ||
| 658 | |||
| 659 | /* Same as map_keymap, but does it right, properly eliminating duplicate | 651 | /* Same as map_keymap, but does it right, properly eliminating duplicate |
| 660 | bindings due to inheritance. */ | 652 | bindings due to inheritance. */ |
| 661 | void | 653 | void |
| @@ -1998,7 +1990,6 @@ then the value includes only maps for prefixes that start with PREFIX. */) | |||
| 1998 | } | 1990 | } |
| 1999 | return maps; | 1991 | return maps; |
| 2000 | } | 1992 | } |
| 2001 | static Lisp_Object Qsingle_key_description, Qkey_description; | ||
| 2002 | 1993 | ||
| 2003 | /* This function cannot GC. */ | 1994 | /* This function cannot GC. */ |
| 2004 | 1995 | ||
| @@ -3734,12 +3725,15 @@ be preferred. */); | |||
| 3734 | Vwhere_is_preferred_modifier = Qnil; | 3725 | Vwhere_is_preferred_modifier = Qnil; |
| 3735 | where_is_preferred_modifier = 0; | 3726 | where_is_preferred_modifier = 0; |
| 3736 | 3727 | ||
| 3728 | DEFSYM (Qmenu_bar, "menu-bar"); | ||
| 3729 | DEFSYM (Qmode_line, "mode-line"); | ||
| 3730 | |||
| 3737 | staticpro (&Vmouse_events); | 3731 | staticpro (&Vmouse_events); |
| 3738 | Vmouse_events = listn (CONSTYPE_PURE, 9, | 3732 | Vmouse_events = listn (CONSTYPE_PURE, 9, |
| 3739 | intern_c_string ("menu-bar"), | 3733 | Qmenu_bar, |
| 3740 | intern_c_string ("tool-bar"), | 3734 | intern_c_string ("tool-bar"), |
| 3741 | intern_c_string ("header-line"), | 3735 | intern_c_string ("header-line"), |
| 3742 | intern_c_string ("mode-line"), | 3736 | Qmode_line, |
| 3743 | intern_c_string ("mouse-1"), | 3737 | intern_c_string ("mouse-1"), |
| 3744 | intern_c_string ("mouse-2"), | 3738 | intern_c_string ("mouse-2"), |
| 3745 | intern_c_string ("mouse-3"), | 3739 | intern_c_string ("mouse-3"), |
| @@ -3748,6 +3742,9 @@ be preferred. */); | |||
| 3748 | 3742 | ||
| 3749 | DEFSYM (Qsingle_key_description, "single-key-description"); | 3743 | DEFSYM (Qsingle_key_description, "single-key-description"); |
| 3750 | DEFSYM (Qkey_description, "key-description"); | 3744 | DEFSYM (Qkey_description, "key-description"); |
| 3745 | |||
| 3746 | /* Keymap used for minibuffers when doing completion. */ | ||
| 3747 | /* Keymap used for minibuffers when doing completion and require a match. */ | ||
| 3751 | DEFSYM (Qkeymapp, "keymapp"); | 3748 | DEFSYM (Qkeymapp, "keymapp"); |
| 3752 | DEFSYM (Qnon_ascii, "non-ascii"); | 3749 | DEFSYM (Qnon_ascii, "non-ascii"); |
| 3753 | DEFSYM (Qmenu_item, "menu-item"); | 3750 | DEFSYM (Qmenu_item, "menu-item"); |
diff --git a/src/keymap.h b/src/keymap.h index 4649acb719f..215dd3f289f 100644 --- a/src/keymap.h +++ b/src/keymap.h | |||
| @@ -30,9 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) | 30 | #define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) |
| 31 | 31 | ||
| 32 | #define KEYMAPP(m) (!NILP (get_keymap (m, false, false))) | 32 | #define KEYMAPP(m) (!NILP (get_keymap (m, false, false))) |
| 33 | extern Lisp_Object Qkeymap, Qmenu_bar; | ||
| 34 | extern Lisp_Object Qremap; | ||
| 35 | extern Lisp_Object Qmenu_item; | ||
| 36 | extern Lisp_Object current_global_map; | 33 | extern Lisp_Object current_global_map; |
| 37 | extern char *push_key_description (EMACS_INT, char *); | 34 | extern char *push_key_description (EMACS_INT, char *); |
| 38 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, bool, bool, bool); | 35 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, bool, bool, bool); |
diff --git a/src/lisp.h b/src/lisp.h index d416661e5f4..9e1f1501464 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -233,8 +233,8 @@ extern bool suppress_checking EXTERNALLY_VISIBLE; | |||
| 233 | 233 | ||
| 234 | USE_LSB_TAG not only requires the least 3 bits of pointers returned by | 234 | USE_LSB_TAG not only requires the least 3 bits of pointers returned by |
| 235 | malloc to be 0 but also needs to be able to impose a mult-of-8 alignment | 235 | malloc to be 0 but also needs to be able to impose a mult-of-8 alignment |
| 236 | on the few static Lisp_Objects used: all the defsubr as well | 236 | on the few static Lisp_Objects used: lispsym, all the defsubr, and |
| 237 | as the two special buffers buffer_defaults and buffer_local_symbols. */ | 237 | the two special buffers buffer_defaults and buffer_local_symbols. */ |
| 238 | 238 | ||
| 239 | enum Lisp_Bits | 239 | enum Lisp_Bits |
| 240 | { | 240 | { |
| @@ -354,9 +354,8 @@ error !; | |||
| 354 | #define lisp_h_XCONS(a) \ | 354 | #define lisp_h_XCONS(a) \ |
| 355 | (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons)) | 355 | (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons)) |
| 356 | #define lisp_h_XHASH(a) XUINT (a) | 356 | #define lisp_h_XHASH(a) XUINT (a) |
| 357 | #define lisp_h_XPNTR(a) ((void *) (intptr_t) (XLI (a) & VALMASK)) | 357 | #define lisp_h_XPNTR(a) \ |
| 358 | #define lisp_h_XSYMBOL(a) \ | 358 | (SYMBOLP (a) ? XSYMBOL (a) : (void *) ((intptr_t) (XLI (a) & VALMASK))) |
| 359 | (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol)) | ||
| 360 | #ifndef GC_CHECK_CONS_LIST | 359 | #ifndef GC_CHECK_CONS_LIST |
| 361 | # define lisp_h_check_cons_list() ((void) 0) | 360 | # define lisp_h_check_cons_list() ((void) 0) |
| 362 | #endif | 361 | #endif |
| @@ -365,8 +364,12 @@ error !; | |||
| 365 | XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) | 364 | XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) |
| 366 | # define lisp_h_XFASTINT(a) XINT (a) | 365 | # define lisp_h_XFASTINT(a) XINT (a) |
| 367 | # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) | 366 | # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) |
| 367 | # define lisp_h_XSYMBOL(a) \ | ||
| 368 | (eassert (SYMBOLP (a)), \ | ||
| 369 | (struct Lisp_Symbol *) ((uintptr_t) XLI (a) - Lisp_Symbol \ | ||
| 370 | + (char *) lispsym)) | ||
| 368 | # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) | 371 | # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) |
| 369 | # define lisp_h_XUNTAG(a, type) ((void *) (XLI (a) - (type))) | 372 | # define lisp_h_XUNTAG(a, type) ((void *) (intptr_t) (XLI (a) - (type))) |
| 370 | #endif | 373 | #endif |
| 371 | 374 | ||
| 372 | /* When compiling via gcc -O0, define the key operations as macros, as | 375 | /* When compiling via gcc -O0, define the key operations as macros, as |
| @@ -398,7 +401,6 @@ error !; | |||
| 398 | # define XCONS(a) lisp_h_XCONS (a) | 401 | # define XCONS(a) lisp_h_XCONS (a) |
| 399 | # define XHASH(a) lisp_h_XHASH (a) | 402 | # define XHASH(a) lisp_h_XHASH (a) |
| 400 | # define XPNTR(a) lisp_h_XPNTR (a) | 403 | # define XPNTR(a) lisp_h_XPNTR (a) |
| 401 | # define XSYMBOL(a) lisp_h_XSYMBOL (a) | ||
| 402 | # ifndef GC_CHECK_CONS_LIST | 404 | # ifndef GC_CHECK_CONS_LIST |
| 403 | # define check_cons_list() lisp_h_check_cons_list () | 405 | # define check_cons_list() lisp_h_check_cons_list () |
| 404 | # endif | 406 | # endif |
| @@ -406,6 +408,7 @@ error !; | |||
| 406 | # define make_number(n) lisp_h_make_number (n) | 408 | # define make_number(n) lisp_h_make_number (n) |
| 407 | # define XFASTINT(a) lisp_h_XFASTINT (a) | 409 | # define XFASTINT(a) lisp_h_XFASTINT (a) |
| 408 | # define XINT(a) lisp_h_XINT (a) | 410 | # define XINT(a) lisp_h_XINT (a) |
| 411 | # define XSYMBOL(a) lisp_h_XSYMBOL (a) | ||
| 409 | # define XTYPE(a) lisp_h_XTYPE (a) | 412 | # define XTYPE(a) lisp_h_XTYPE (a) |
| 410 | # define XUNTAG(a, type) lisp_h_XUNTAG (a, type) | 413 | # define XUNTAG(a, type) lisp_h_XUNTAG (a, type) |
| 411 | # endif | 414 | # endif |
| @@ -447,20 +450,20 @@ error !; | |||
| 447 | 450 | ||
| 448 | enum Lisp_Type | 451 | enum Lisp_Type |
| 449 | { | 452 | { |
| 450 | /* Integer. XINT (obj) is the integer value. */ | ||
| 451 | Lisp_Int0 = 0, | ||
| 452 | Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1, | ||
| 453 | |||
| 454 | /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ | 453 | /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ |
| 455 | Lisp_Symbol = 2, | 454 | Lisp_Symbol = 0, |
| 456 | 455 | ||
| 457 | /* Miscellaneous. XMISC (object) points to a union Lisp_Misc, | 456 | /* Miscellaneous. XMISC (object) points to a union Lisp_Misc, |
| 458 | whose first member indicates the subtype. */ | 457 | whose first member indicates the subtype. */ |
| 459 | Lisp_Misc = 3, | 458 | Lisp_Misc = 1, |
| 459 | |||
| 460 | /* Integer. XINT (obj) is the integer value. */ | ||
| 461 | Lisp_Int0 = 2, | ||
| 462 | Lisp_Int1 = USE_LSB_TAG ? 6 : 3, | ||
| 460 | 463 | ||
| 461 | /* String. XSTRING (object) points to a struct Lisp_String. | 464 | /* String. XSTRING (object) points to a struct Lisp_String. |
| 462 | The length of the string, and its contents, are stored therein. */ | 465 | The length of the string, and its contents, are stored therein. */ |
| 463 | Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS, | 466 | Lisp_String = 4, |
| 464 | 467 | ||
| 465 | /* Vector of Lisp objects, or something resembling it. | 468 | /* Vector of Lisp objects, or something resembling it. |
| 466 | XVECTOR (object) points to a struct Lisp_Vector, which contains | 469 | XVECTOR (object) points to a struct Lisp_Vector, which contains |
| @@ -469,7 +472,7 @@ enum Lisp_Type | |||
| 469 | Lisp_Vectorlike = 5, | 472 | Lisp_Vectorlike = 5, |
| 470 | 473 | ||
| 471 | /* Cons. XCONS (object) points to a struct Lisp_Cons. */ | 474 | /* Cons. XCONS (object) points to a struct Lisp_Cons. */ |
| 472 | Lisp_Cons = 6, | 475 | Lisp_Cons = USE_LSB_TAG ? 3 : 6, |
| 473 | 476 | ||
| 474 | Lisp_Float = 7 | 477 | Lisp_Float = 7 |
| 475 | }; | 478 | }; |
| @@ -562,7 +565,7 @@ enum Lisp_Fwd_Type | |||
| 562 | 565 | ||
| 563 | typedef struct { EMACS_INT i; } Lisp_Object; | 566 | typedef struct { EMACS_INT i; } Lisp_Object; |
| 564 | 567 | ||
| 565 | #define LISP_INITIALLY_ZERO {0} | 568 | #define LISP_INITIALLY(i) {i} |
| 566 | 569 | ||
| 567 | #undef CHECK_LISP_OBJECT_TYPE | 570 | #undef CHECK_LISP_OBJECT_TYPE |
| 568 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; | 571 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; |
| @@ -571,9 +574,11 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; | |||
| 571 | /* If a struct type is not wanted, define Lisp_Object as just a number. */ | 574 | /* If a struct type is not wanted, define Lisp_Object as just a number. */ |
| 572 | 575 | ||
| 573 | typedef EMACS_INT Lisp_Object; | 576 | typedef EMACS_INT Lisp_Object; |
| 574 | #define LISP_INITIALLY_ZERO 0 | 577 | #define LISP_INITIALLY(i) (i) |
| 575 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; | 578 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; |
| 576 | #endif /* CHECK_LISP_OBJECT_TYPE */ | 579 | #endif /* CHECK_LISP_OBJECT_TYPE */ |
| 580 | |||
| 581 | #define LISP_INITIALLY_ZERO LISP_INITIALLY (0) | ||
| 577 | 582 | ||
| 578 | /* Forward declarations. */ | 583 | /* Forward declarations. */ |
| 579 | 584 | ||
| @@ -604,18 +609,15 @@ INLINE bool (SYMBOLP) (Lisp_Object); | |||
| 604 | INLINE bool (VECTORLIKEP) (Lisp_Object); | 609 | INLINE bool (VECTORLIKEP) (Lisp_Object); |
| 605 | INLINE bool WINDOWP (Lisp_Object); | 610 | INLINE bool WINDOWP (Lisp_Object); |
| 606 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); | 611 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); |
| 612 | INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object); | ||
| 613 | INLINE enum Lisp_Type (XTYPE) (Lisp_Object); | ||
| 614 | INLINE void *(XUNTAG) (Lisp_Object, int); | ||
| 607 | 615 | ||
| 608 | /* Defined in chartab.c. */ | 616 | /* Defined in chartab.c. */ |
| 609 | extern Lisp_Object char_table_ref (Lisp_Object, int); | 617 | extern Lisp_Object char_table_ref (Lisp_Object, int); |
| 610 | extern void char_table_set (Lisp_Object, int, Lisp_Object); | 618 | extern void char_table_set (Lisp_Object, int, Lisp_Object); |
| 611 | 619 | ||
| 612 | /* Defined in data.c. */ | 620 | /* Defined in data.c. */ |
| 613 | extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; | ||
| 614 | extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; | ||
| 615 | extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp; | ||
| 616 | extern Lisp_Object Qbool_vector_p; | ||
| 617 | extern Lisp_Object Qvector_or_char_table_p, Qwholenump; | ||
| 618 | extern Lisp_Object Qwindow; | ||
| 619 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); | 621 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); |
| 620 | extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); | 622 | extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); |
| 621 | 623 | ||
| @@ -625,22 +627,122 @@ extern bool might_dump; | |||
| 625 | Used during startup to detect startup of dumped Emacs. */ | 627 | Used during startup to detect startup of dumped Emacs. */ |
| 626 | extern bool initialized; | 628 | extern bool initialized; |
| 627 | 629 | ||
| 628 | /* Defined in eval.c. */ | ||
| 629 | extern Lisp_Object Qautoload; | ||
| 630 | |||
| 631 | /* Defined in floatfns.c. */ | 630 | /* Defined in floatfns.c. */ |
| 632 | extern double extract_float (Lisp_Object); | 631 | extern double extract_float (Lisp_Object); |
| 633 | 632 | ||
| 634 | /* Defined in process.c. */ | 633 | |
| 635 | extern Lisp_Object Qprocessp; | 634 | /* Interned state of a symbol. */ |
| 635 | |||
| 636 | enum symbol_interned | ||
| 637 | { | ||
| 638 | SYMBOL_UNINTERNED = 0, | ||
| 639 | SYMBOL_INTERNED = 1, | ||
| 640 | SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2 | ||
| 641 | }; | ||
| 636 | 642 | ||
| 637 | /* Defined in window.c. */ | 643 | enum symbol_redirect |
| 638 | extern Lisp_Object Qwindowp; | 644 | { |
| 645 | SYMBOL_PLAINVAL = 4, | ||
| 646 | SYMBOL_VARALIAS = 1, | ||
| 647 | SYMBOL_LOCALIZED = 2, | ||
| 648 | SYMBOL_FORWARDED = 3 | ||
| 649 | }; | ||
| 650 | |||
| 651 | struct Lisp_Symbol | ||
| 652 | { | ||
| 653 | bool_bf gcmarkbit : 1; | ||
| 654 | |||
| 655 | /* Indicates where the value can be found: | ||
| 656 | 0 : it's a plain var, the value is in the `value' field. | ||
| 657 | 1 : it's a varalias, the value is really in the `alias' symbol. | ||
| 658 | 2 : it's a localized var, the value is in the `blv' object. | ||
| 659 | 3 : it's a forwarding variable, the value is in `forward'. */ | ||
| 660 | ENUM_BF (symbol_redirect) redirect : 3; | ||
| 661 | |||
| 662 | /* Non-zero means symbol is constant, i.e. changing its value | ||
| 663 | should signal an error. If the value is 3, then the var | ||
| 664 | can be changed, but only by `defconst'. */ | ||
| 665 | unsigned constant : 2; | ||
| 666 | |||
| 667 | /* Interned state of the symbol. This is an enumerator from | ||
| 668 | enum symbol_interned. */ | ||
| 669 | unsigned interned : 2; | ||
| 670 | |||
| 671 | /* True means that this variable has been explicitly declared | ||
| 672 | special (with `defvar' etc), and shouldn't be lexically bound. */ | ||
| 673 | bool_bf declared_special : 1; | ||
| 674 | |||
| 675 | /* True if pointed to from purespace and hence can't be GC'd. */ | ||
| 676 | bool_bf pinned : 1; | ||
| 677 | |||
| 678 | /* The symbol's name, as a Lisp string. */ | ||
| 679 | Lisp_Object name; | ||
| 680 | |||
| 681 | /* Value of the symbol or Qunbound if unbound. Which alternative of the | ||
| 682 | union is used depends on the `redirect' field above. */ | ||
| 683 | union { | ||
| 684 | Lisp_Object value; | ||
| 685 | struct Lisp_Symbol *alias; | ||
| 686 | struct Lisp_Buffer_Local_Value *blv; | ||
| 687 | union Lisp_Fwd *fwd; | ||
| 688 | } val; | ||
| 689 | |||
| 690 | /* Function value of the symbol or Qnil if not fboundp. */ | ||
| 691 | Lisp_Object function; | ||
| 692 | |||
| 693 | /* The symbol's property list. */ | ||
| 694 | Lisp_Object plist; | ||
| 695 | |||
| 696 | /* Next symbol in obarray bucket, if the symbol is interned. */ | ||
| 697 | struct Lisp_Symbol *next; | ||
| 698 | }; | ||
| 699 | |||
| 700 | /* Declare a Lisp-callable function. The MAXARGS parameter has the same | ||
| 701 | meaning as in the DEFUN macro, and is used to construct a prototype. */ | ||
| 702 | /* We can use the same trick as in the DEFUN macro to generate the | ||
| 703 | appropriate prototype. */ | ||
| 704 | #define EXFUN(fnname, maxargs) \ | ||
| 705 | extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs | ||
| 706 | |||
| 707 | /* Note that the weird token-substitution semantics of ANSI C makes | ||
| 708 | this work for MANY and UNEVALLED. */ | ||
| 709 | #define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *) | ||
| 710 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) | ||
| 711 | #define DEFUN_ARGS_0 (void) | ||
| 712 | #define DEFUN_ARGS_1 (Lisp_Object) | ||
| 713 | #define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object) | ||
| 714 | #define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 715 | #define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 716 | #define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 717 | Lisp_Object) | ||
| 718 | #define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 719 | Lisp_Object, Lisp_Object) | ||
| 720 | #define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 721 | Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 722 | #define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 723 | Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 724 | |||
| 725 | /* Yield an integer that contains TAG along with PTR. */ | ||
| 726 | #define TAG_PTR(tag, ptr) \ | ||
| 727 | ((USE_LSB_TAG ? (tag) : (EMACS_UINT) (tag) << VALBITS) + (uintptr_t) (ptr)) | ||
| 728 | |||
| 729 | /* Yield an integer that contains a symbol tag along with OFFSET. | ||
| 730 | OFFSET should be the offset in bytes from 'lispsym' to the symbol. */ | ||
| 731 | #define TAG_SYMOFFSET(offset) \ | ||
| 732 | TAG_PTR (Lisp_Symbol, \ | ||
| 733 | ((uintptr_t) (offset) >> (USE_LSB_TAG ? 0 : GCTYPEBITS))) | ||
| 734 | |||
| 735 | /* Declare extern constants for Lisp symbols. These can be helpful | ||
| 736 | when using a debugger like GDB, on older platforms where the debug | ||
| 737 | format does not represent C macros. */ | ||
| 738 | #define DEFINE_LISP_SYMBOL_BEGIN(name) \ | ||
| 739 | DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) | ||
| 740 | #define DEFINE_LISP_SYMBOL_END(name) \ | ||
| 741 | DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_SYMOFFSET (i##name \ | ||
| 742 | * sizeof *lispsym))) | ||
| 743 | |||
| 744 | #include "globals.h" | ||
| 639 | 745 | ||
| 640 | /* Defined in xdisp.c. */ | ||
| 641 | extern Lisp_Object Qimage; | ||
| 642 | extern Lisp_Object Qfontification_functions; | ||
| 643 | |||
| 644 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. | 746 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. |
| 645 | At the machine level, these operations are no-ops. */ | 747 | At the machine level, these operations are no-ops. */ |
| 646 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) | 748 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) |
| @@ -731,6 +833,7 @@ LISP_MACRO_DEFUN (XPNTR, void *, (Lisp_Object a), (a)) | |||
| 731 | LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) | 833 | LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) |
| 732 | LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) | 834 | LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) |
| 733 | LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) | 835 | LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) |
| 836 | LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) | ||
| 734 | LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) | 837 | LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) |
| 735 | LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) | 838 | LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) |
| 736 | 839 | ||
| @@ -785,6 +888,17 @@ XFASTINT (Lisp_Object a) | |||
| 785 | return n; | 888 | return n; |
| 786 | } | 889 | } |
| 787 | 890 | ||
| 891 | /* Extract A's value as a symbol. */ | ||
| 892 | INLINE struct Lisp_Symbol * | ||
| 893 | XSYMBOL (Lisp_Object a) | ||
| 894 | { | ||
| 895 | uintptr_t i = (uintptr_t) XUNTAG (a, Lisp_Symbol); | ||
| 896 | if (! USE_LSB_TAG) | ||
| 897 | i <<= GCTYPEBITS; | ||
| 898 | void *p = (char *) lispsym + i; | ||
| 899 | return p; | ||
| 900 | } | ||
| 901 | |||
| 788 | /* Extract A's type. */ | 902 | /* Extract A's type. */ |
| 789 | INLINE enum Lisp_Type | 903 | INLINE enum Lisp_Type |
| 790 | XTYPE (Lisp_Object a) | 904 | XTYPE (Lisp_Object a) |
| @@ -797,12 +911,8 @@ XTYPE (Lisp_Object a) | |||
| 797 | INLINE void * | 911 | INLINE void * |
| 798 | XUNTAG (Lisp_Object a, int type) | 912 | XUNTAG (Lisp_Object a, int type) |
| 799 | { | 913 | { |
| 800 | if (USE_LSB_TAG) | 914 | intptr_t i = USE_LSB_TAG ? XLI (a) - type : XLI (a) & VALMASK; |
| 801 | { | 915 | return (void *) i; |
| 802 | intptr_t i = XLI (a) - type; | ||
| 803 | return (void *) i; | ||
| 804 | } | ||
| 805 | return XPNTR (a); | ||
| 806 | } | 916 | } |
| 807 | 917 | ||
| 808 | #endif /* ! USE_LSB_TAG */ | 918 | #endif /* ! USE_LSB_TAG */ |
| @@ -864,7 +974,9 @@ XSTRING (Lisp_Object a) | |||
| 864 | return XUNTAG (a, Lisp_String); | 974 | return XUNTAG (a, Lisp_String); |
| 865 | } | 975 | } |
| 866 | 976 | ||
| 867 | LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) | 977 | /* The index of the C-defined Lisp symbol SYM. |
| 978 | This can be used in a static initializer. */ | ||
| 979 | #define SYMBOL_INDEX(sym) i##sym | ||
| 868 | 980 | ||
| 869 | INLINE struct Lisp_Float * | 981 | INLINE struct Lisp_Float * |
| 870 | XFLOAT (Lisp_Object a) | 982 | XFLOAT (Lisp_Object a) |
| @@ -935,14 +1047,26 @@ XBOOL_VECTOR (Lisp_Object a) | |||
| 935 | INLINE Lisp_Object | 1047 | INLINE Lisp_Object |
| 936 | make_lisp_ptr (void *ptr, enum Lisp_Type type) | 1048 | make_lisp_ptr (void *ptr, enum Lisp_Type type) |
| 937 | { | 1049 | { |
| 938 | EMACS_UINT utype = type; | 1050 | Lisp_Object a = XIL (TAG_PTR (type, ptr)); |
| 939 | EMACS_UINT typebits = USE_LSB_TAG ? type : utype << VALBITS; | ||
| 940 | Lisp_Object a = XIL (typebits | (uintptr_t) ptr); | ||
| 941 | eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr); | 1051 | eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr); |
| 942 | return a; | 1052 | return a; |
| 943 | } | 1053 | } |
| 944 | 1054 | ||
| 945 | INLINE Lisp_Object | 1055 | INLINE Lisp_Object |
| 1056 | make_lisp_symbol (struct Lisp_Symbol *sym) | ||
| 1057 | { | ||
| 1058 | Lisp_Object a = XIL (TAG_SYMOFFSET ((char *) sym - (char *) lispsym)); | ||
| 1059 | eassert (XSYMBOL (a) == sym); | ||
| 1060 | return a; | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | INLINE Lisp_Object | ||
| 1064 | builtin_lisp_symbol (int index) | ||
| 1065 | { | ||
| 1066 | return make_lisp_symbol (lispsym + index); | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | INLINE Lisp_Object | ||
| 946 | make_lisp_proc (struct Lisp_Process *p) | 1070 | make_lisp_proc (struct Lisp_Process *p) |
| 947 | { | 1071 | { |
| 948 | return make_lisp_ptr (p, Lisp_Vectorlike); | 1072 | return make_lisp_ptr (p, Lisp_Vectorlike); |
| @@ -953,7 +1077,7 @@ make_lisp_proc (struct Lisp_Process *p) | |||
| 953 | #define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) | 1077 | #define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) |
| 954 | #define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) | 1078 | #define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) |
| 955 | #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) | 1079 | #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) |
| 956 | #define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) | 1080 | #define XSETSYMBOL(a, b) ((a) = make_lisp_symbol (b)) |
| 957 | #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) | 1081 | #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) |
| 958 | #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) | 1082 | #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) |
| 959 | 1083 | ||
| @@ -991,6 +1115,25 @@ make_lisp_proc (struct Lisp_Process *p) | |||
| 991 | #define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) | 1115 | #define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) |
| 992 | #define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) | 1116 | #define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) |
| 993 | 1117 | ||
| 1118 | /* Efficiently convert a pointer to a Lisp object and back. The | ||
| 1119 | pointer is represented as a Lisp integer, so the garbage collector | ||
| 1120 | does not know about it. The pointer should not have both Lisp_Int1 | ||
| 1121 | bits set, which makes this conversion inherently unportable. */ | ||
| 1122 | |||
| 1123 | INLINE void * | ||
| 1124 | XINTPTR (Lisp_Object a) | ||
| 1125 | { | ||
| 1126 | return XUNTAG (a, Lisp_Int0); | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | INLINE Lisp_Object | ||
| 1130 | make_pointer_integer (void *p) | ||
| 1131 | { | ||
| 1132 | Lisp_Object a = XIL (TAG_PTR (Lisp_Int0, p)); | ||
| 1133 | eassert (INTEGERP (a) && XINTPTR (a) == p); | ||
| 1134 | return a; | ||
| 1135 | } | ||
| 1136 | |||
| 994 | /* Type checking. */ | 1137 | /* Type checking. */ |
| 995 | 1138 | ||
| 996 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, | 1139 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, |
| @@ -1560,72 +1703,6 @@ verify ((offsetof (struct Lisp_Sub_Char_Table, contents) | |||
| 1560 | Symbols | 1703 | Symbols |
| 1561 | ***********************************************************************/ | 1704 | ***********************************************************************/ |
| 1562 | 1705 | ||
| 1563 | /* Interned state of a symbol. */ | ||
| 1564 | |||
| 1565 | enum symbol_interned | ||
| 1566 | { | ||
| 1567 | SYMBOL_UNINTERNED = 0, | ||
| 1568 | SYMBOL_INTERNED = 1, | ||
| 1569 | SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2 | ||
| 1570 | }; | ||
| 1571 | |||
| 1572 | enum symbol_redirect | ||
| 1573 | { | ||
| 1574 | SYMBOL_PLAINVAL = 4, | ||
| 1575 | SYMBOL_VARALIAS = 1, | ||
| 1576 | SYMBOL_LOCALIZED = 2, | ||
| 1577 | SYMBOL_FORWARDED = 3 | ||
| 1578 | }; | ||
| 1579 | |||
| 1580 | struct Lisp_Symbol | ||
| 1581 | { | ||
| 1582 | bool_bf gcmarkbit : 1; | ||
| 1583 | |||
| 1584 | /* Indicates where the value can be found: | ||
| 1585 | 0 : it's a plain var, the value is in the `value' field. | ||
| 1586 | 1 : it's a varalias, the value is really in the `alias' symbol. | ||
| 1587 | 2 : it's a localized var, the value is in the `blv' object. | ||
| 1588 | 3 : it's a forwarding variable, the value is in `forward'. */ | ||
| 1589 | ENUM_BF (symbol_redirect) redirect : 3; | ||
| 1590 | |||
| 1591 | /* Non-zero means symbol is constant, i.e. changing its value | ||
| 1592 | should signal an error. If the value is 3, then the var | ||
| 1593 | can be changed, but only by `defconst'. */ | ||
| 1594 | unsigned constant : 2; | ||
| 1595 | |||
| 1596 | /* Interned state of the symbol. This is an enumerator from | ||
| 1597 | enum symbol_interned. */ | ||
| 1598 | unsigned interned : 2; | ||
| 1599 | |||
| 1600 | /* True means that this variable has been explicitly declared | ||
| 1601 | special (with `defvar' etc), and shouldn't be lexically bound. */ | ||
| 1602 | bool_bf declared_special : 1; | ||
| 1603 | |||
| 1604 | /* True if pointed to from purespace and hence can't be GC'd. */ | ||
| 1605 | bool_bf pinned : 1; | ||
| 1606 | |||
| 1607 | /* The symbol's name, as a Lisp string. */ | ||
| 1608 | Lisp_Object name; | ||
| 1609 | |||
| 1610 | /* Value of the symbol or Qunbound if unbound. Which alternative of the | ||
| 1611 | union is used depends on the `redirect' field above. */ | ||
| 1612 | union { | ||
| 1613 | Lisp_Object value; | ||
| 1614 | struct Lisp_Symbol *alias; | ||
| 1615 | struct Lisp_Buffer_Local_Value *blv; | ||
| 1616 | union Lisp_Fwd *fwd; | ||
| 1617 | } val; | ||
| 1618 | |||
| 1619 | /* Function value of the symbol or Qnil if not fboundp. */ | ||
| 1620 | Lisp_Object function; | ||
| 1621 | |||
| 1622 | /* The symbol's property list. */ | ||
| 1623 | Lisp_Object plist; | ||
| 1624 | |||
| 1625 | /* Next symbol in obarray bucket, if the symbol is interned. */ | ||
| 1626 | struct Lisp_Symbol *next; | ||
| 1627 | }; | ||
| 1628 | |||
| 1629 | /* Value is name of symbol. */ | 1706 | /* Value is name of symbol. */ |
| 1630 | 1707 | ||
| 1631 | LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) | 1708 | LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) |
| @@ -1699,8 +1776,9 @@ SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym) | |||
| 1699 | 1776 | ||
| 1700 | LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) | 1777 | LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) |
| 1701 | 1778 | ||
| 1702 | #define DEFSYM(sym, name) \ | 1779 | /* Placeholder for make-docfile to process. The actual symbol |
| 1703 | do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (false) | 1780 | definition is done by lread.c's defsym. */ |
| 1781 | #define DEFSYM(sym, name) /* empty */ | ||
| 1704 | 1782 | ||
| 1705 | 1783 | ||
| 1706 | /*********************************************************************** | 1784 | /*********************************************************************** |
| @@ -2694,24 +2772,6 @@ CHECK_NUMBER_CDR (Lisp_Object x) | |||
| 2694 | Lisp_Object fnname | 2772 | Lisp_Object fnname |
| 2695 | #endif | 2773 | #endif |
| 2696 | 2774 | ||
| 2697 | /* Note that the weird token-substitution semantics of ANSI C makes | ||
| 2698 | this work for MANY and UNEVALLED. */ | ||
| 2699 | #define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *) | ||
| 2700 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) | ||
| 2701 | #define DEFUN_ARGS_0 (void) | ||
| 2702 | #define DEFUN_ARGS_1 (Lisp_Object) | ||
| 2703 | #define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object) | ||
| 2704 | #define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 2705 | #define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 2706 | #define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 2707 | Lisp_Object) | ||
| 2708 | #define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 2709 | Lisp_Object, Lisp_Object) | ||
| 2710 | #define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 2711 | Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 2712 | #define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ | ||
| 2713 | Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) | ||
| 2714 | |||
| 2715 | /* True if OBJ is a Lisp function. */ | 2775 | /* True if OBJ is a Lisp function. */ |
| 2716 | INLINE bool | 2776 | INLINE bool |
| 2717 | FUNCTIONP (Lisp_Object obj) | 2777 | FUNCTIONP (Lisp_Object obj) |
| @@ -3260,15 +3320,6 @@ extern int gcpro_level; | |||
| 3260 | 3320 | ||
| 3261 | void staticpro (Lisp_Object *); | 3321 | void staticpro (Lisp_Object *); |
| 3262 | 3322 | ||
| 3263 | /* Declare a Lisp-callable function. The MAXARGS parameter has the same | ||
| 3264 | meaning as in the DEFUN macro, and is used to construct a prototype. */ | ||
| 3265 | /* We can use the same trick as in the DEFUN macro to generate the | ||
| 3266 | appropriate prototype. */ | ||
| 3267 | #define EXFUN(fnname, maxargs) \ | ||
| 3268 | extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs | ||
| 3269 | |||
| 3270 | #include "globals.h" | ||
| 3271 | |||
| 3272 | /* Forward declarations for prototypes. */ | 3323 | /* Forward declarations for prototypes. */ |
| 3273 | struct window; | 3324 | struct window; |
| 3274 | struct frame; | 3325 | struct frame; |
| @@ -3387,30 +3438,6 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val) | |||
| 3387 | } | 3438 | } |
| 3388 | 3439 | ||
| 3389 | /* Defined in data.c. */ | 3440 | /* Defined in data.c. */ |
| 3390 | extern Lisp_Object Qquote, Qunbound; | ||
| 3391 | extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; | ||
| 3392 | extern Lisp_Object Qerror, Qquit, Qargs_out_of_range; | ||
| 3393 | extern Lisp_Object Qvoid_variable, Qvoid_function; | ||
| 3394 | extern Lisp_Object Qinvalid_read_syntax; | ||
| 3395 | extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; | ||
| 3396 | extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive; | ||
| 3397 | extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; | ||
| 3398 | extern Lisp_Object Qtext_read_only; | ||
| 3399 | extern Lisp_Object Qinteractive_form; | ||
| 3400 | extern Lisp_Object Qcircular_list; | ||
| 3401 | extern Lisp_Object Qsequencep; | ||
| 3402 | extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p; | ||
| 3403 | extern Lisp_Object Qfboundp; | ||
| 3404 | |||
| 3405 | extern Lisp_Object Qcdr; | ||
| 3406 | |||
| 3407 | extern Lisp_Object Qrange_error, Qoverflow_error; | ||
| 3408 | |||
| 3409 | extern Lisp_Object Qnumber_or_marker_p; | ||
| 3410 | |||
| 3411 | extern Lisp_Object Qbuffer, Qinteger, Qsymbol; | ||
| 3412 | |||
| 3413 | /* Defined in data.c. */ | ||
| 3414 | extern Lisp_Object indirect_function (Lisp_Object); | 3441 | extern Lisp_Object indirect_function (Lisp_Object); |
| 3415 | extern Lisp_Object find_symbol_value (Lisp_Object); | 3442 | extern Lisp_Object find_symbol_value (Lisp_Object); |
| 3416 | enum Arith_Comparison { | 3443 | enum Arith_Comparison { |
| @@ -3466,7 +3493,6 @@ extern void syms_of_cmds (void); | |||
| 3466 | extern void keys_of_cmds (void); | 3493 | extern void keys_of_cmds (void); |
| 3467 | 3494 | ||
| 3468 | /* Defined in coding.c. */ | 3495 | /* Defined in coding.c. */ |
| 3469 | extern Lisp_Object Qcharset; | ||
| 3470 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, | 3496 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, |
| 3471 | ptrdiff_t, bool, bool, Lisp_Object); | 3497 | ptrdiff_t, bool, bool, Lisp_Object); |
| 3472 | extern void init_coding (void); | 3498 | extern void init_coding (void); |
| @@ -3490,14 +3516,10 @@ extern void init_syntax_once (void); | |||
| 3490 | extern void syms_of_syntax (void); | 3516 | extern void syms_of_syntax (void); |
| 3491 | 3517 | ||
| 3492 | /* Defined in fns.c. */ | 3518 | /* Defined in fns.c. */ |
| 3493 | extern Lisp_Object QCrehash_size, QCrehash_threshold; | ||
| 3494 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; | 3519 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; |
| 3495 | extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; | 3520 | extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; |
| 3496 | extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); | 3521 | extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); |
| 3497 | extern void sweep_weak_hash_tables (void); | 3522 | extern void sweep_weak_hash_tables (void); |
| 3498 | extern Lisp_Object Qcursor_in_echo_area; | ||
| 3499 | extern Lisp_Object Qstring_lessp; | ||
| 3500 | extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq; | ||
| 3501 | EMACS_UINT hash_string (char const *, ptrdiff_t); | 3523 | EMACS_UINT hash_string (char const *, ptrdiff_t); |
| 3502 | EMACS_UINT sxhash (Lisp_Object, int); | 3524 | EMACS_UINT sxhash (Lisp_Object, int); |
| 3503 | Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, | 3525 | Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, |
| @@ -3537,15 +3559,11 @@ extern void init_fringe_once (void); | |||
| 3537 | #endif /* HAVE_WINDOW_SYSTEM */ | 3559 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 3538 | 3560 | ||
| 3539 | /* Defined in image.c. */ | 3561 | /* Defined in image.c. */ |
| 3540 | extern Lisp_Object QCascent, QCmargin, QCrelief; | ||
| 3541 | extern Lisp_Object QCconversion; | ||
| 3542 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); | 3562 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); |
| 3543 | extern void reset_image_types (void); | 3563 | extern void reset_image_types (void); |
| 3544 | extern void syms_of_image (void); | 3564 | extern void syms_of_image (void); |
| 3545 | 3565 | ||
| 3546 | /* Defined in insdel.c. */ | 3566 | /* Defined in insdel.c. */ |
| 3547 | extern Lisp_Object Qinhibit_modification_hooks; | ||
| 3548 | extern Lisp_Object Qregion_extract_function; | ||
| 3549 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); | 3567 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); |
| 3550 | extern _Noreturn void buffer_overflow (void); | 3568 | extern _Noreturn void buffer_overflow (void); |
| 3551 | extern void make_gap (ptrdiff_t); | 3569 | extern void make_gap (ptrdiff_t); |
| @@ -3600,18 +3618,6 @@ extern Lisp_Object Vwindow_system; | |||
| 3600 | extern Lisp_Object sit_for (Lisp_Object, bool, int); | 3618 | extern Lisp_Object sit_for (Lisp_Object, bool, int); |
| 3601 | 3619 | ||
| 3602 | /* Defined in xdisp.c. */ | 3620 | /* Defined in xdisp.c. */ |
| 3603 | extern Lisp_Object Qinhibit_point_motion_hooks; | ||
| 3604 | extern Lisp_Object Qinhibit_redisplay; | ||
| 3605 | extern Lisp_Object Qmenu_bar_update_hook; | ||
| 3606 | extern Lisp_Object Qwindow_scroll_functions; | ||
| 3607 | extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | ||
| 3608 | extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; | ||
| 3609 | extern Lisp_Object Qspace, Qcenter, QCalign_to; | ||
| 3610 | extern Lisp_Object Qbar, Qhbar, Qhollow; | ||
| 3611 | extern Lisp_Object Qleft_margin, Qright_margin; | ||
| 3612 | extern Lisp_Object QCdata, QCfile; | ||
| 3613 | extern Lisp_Object QCmap; | ||
| 3614 | extern Lisp_Object Qrisky_local_variable; | ||
| 3615 | extern bool noninteractive_need_newline; | 3621 | extern bool noninteractive_need_newline; |
| 3616 | extern Lisp_Object echo_area_buffer[2]; | 3622 | extern Lisp_Object echo_area_buffer[2]; |
| 3617 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); | 3623 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); |
| @@ -3745,8 +3751,6 @@ build_string (const char *str) | |||
| 3745 | 3751 | ||
| 3746 | extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); | 3752 | extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); |
| 3747 | extern void make_byte_code (struct Lisp_Vector *); | 3753 | extern void make_byte_code (struct Lisp_Vector *); |
| 3748 | extern Lisp_Object Qautomatic_gc; | ||
| 3749 | extern Lisp_Object Qchar_table_extra_slots; | ||
| 3750 | extern struct Lisp_Vector *allocate_vector (EMACS_INT); | 3754 | extern struct Lisp_Vector *allocate_vector (EMACS_INT); |
| 3751 | 3755 | ||
| 3752 | /* Make an uninitialized vector for SIZE objects. NOTE: you must | 3756 | /* Make an uninitialized vector for SIZE objects. NOTE: you must |
| @@ -3850,11 +3854,8 @@ extern void syms_of_chartab (void); | |||
| 3850 | /* Defined in print.c. */ | 3854 | /* Defined in print.c. */ |
| 3851 | extern Lisp_Object Vprin1_to_string_buffer; | 3855 | extern Lisp_Object Vprin1_to_string_buffer; |
| 3852 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; | 3856 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; |
| 3853 | extern Lisp_Object Qstandard_output; | ||
| 3854 | extern Lisp_Object Qexternal_debugging_output; | ||
| 3855 | extern void temp_output_buffer_setup (const char *); | 3857 | extern void temp_output_buffer_setup (const char *); |
| 3856 | extern int print_level; | 3858 | extern int print_level; |
| 3857 | extern Lisp_Object Qprint_escape_newlines; | ||
| 3858 | extern void write_string (const char *, int); | 3859 | extern void write_string (const char *, int); |
| 3859 | extern void print_error_message (Lisp_Object, Lisp_Object, const char *, | 3860 | extern void print_error_message (Lisp_Object, Lisp_Object, const char *, |
| 3860 | Lisp_Object); | 3861 | Lisp_Object); |
| @@ -3878,13 +3879,11 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, | |||
| 3878 | ATTRIBUTE_FORMAT_PRINTF (5, 0); | 3879 | ATTRIBUTE_FORMAT_PRINTF (5, 0); |
| 3879 | 3880 | ||
| 3880 | /* Defined in lread.c. */ | 3881 | /* Defined in lread.c. */ |
| 3881 | extern Lisp_Object Qsize, Qvariable_documentation, Qstandard_input; | ||
| 3882 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; | ||
| 3883 | extern Lisp_Object Qlexical_binding; | ||
| 3884 | extern Lisp_Object check_obarray (Lisp_Object); | 3882 | extern Lisp_Object check_obarray (Lisp_Object); |
| 3885 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); | 3883 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); |
| 3886 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); | 3884 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); |
| 3887 | extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t); | 3885 | extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3886 | extern void init_symbol (Lisp_Object, Lisp_Object); | ||
| 3888 | extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); | 3887 | extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); |
| 3889 | INLINE void | 3888 | INLINE void |
| 3890 | LOADHIST_ATTACH (Lisp_Object x) | 3889 | LOADHIST_ATTACH (Lisp_Object x) |
| @@ -3916,10 +3915,8 @@ intern_c_string (const char *str) | |||
| 3916 | 3915 | ||
| 3917 | /* Defined in eval.c. */ | 3916 | /* Defined in eval.c. */ |
| 3918 | extern EMACS_INT lisp_eval_depth; | 3917 | extern EMACS_INT lisp_eval_depth; |
| 3919 | extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro; | ||
| 3920 | extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; | ||
| 3921 | extern Lisp_Object Qand_rest; | ||
| 3922 | extern Lisp_Object Vautoload_queue; | 3918 | extern Lisp_Object Vautoload_queue; |
| 3919 | extern Lisp_Object Vrun_hooks; | ||
| 3923 | extern Lisp_Object Vsignaling_function; | 3920 | extern Lisp_Object Vsignaling_function; |
| 3924 | extern Lisp_Object inhibit_lisp_code; | 3921 | extern Lisp_Object inhibit_lisp_code; |
| 3925 | extern struct handler *handlerlist; | 3922 | extern struct handler *handlerlist; |
| @@ -3931,7 +3928,7 @@ extern struct handler *handlerlist; | |||
| 3931 | call1 (Vrun_hooks, Qmy_funny_hook); | 3928 | call1 (Vrun_hooks, Qmy_funny_hook); |
| 3932 | 3929 | ||
| 3933 | should no longer be used. */ | 3930 | should no longer be used. */ |
| 3934 | extern Lisp_Object Vrun_hooks; | 3931 | extern void run_hook (Lisp_Object); |
| 3935 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); | 3932 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3936 | extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, | 3933 | extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, |
| 3937 | Lisp_Object (*funcall) | 3934 | Lisp_Object (*funcall) |
| @@ -3992,7 +3989,6 @@ extern bool let_shadows_global_binding_p (Lisp_Object symbol); | |||
| 3992 | 3989 | ||
| 3993 | 3990 | ||
| 3994 | /* Defined in editfns.c. */ | 3991 | /* Defined in editfns.c. */ |
| 3995 | extern Lisp_Object Qfield; | ||
| 3996 | extern void insert1 (Lisp_Object); | 3992 | extern void insert1 (Lisp_Object); |
| 3997 | extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); | 3993 | extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); |
| 3998 | extern Lisp_Object save_excursion_save (void); | 3994 | extern Lisp_Object save_excursion_save (void); |
| @@ -4039,12 +4035,6 @@ extern void syms_of_marker (void); | |||
| 4039 | 4035 | ||
| 4040 | /* Defined in fileio.c. */ | 4036 | /* Defined in fileio.c. */ |
| 4041 | 4037 | ||
| 4042 | extern Lisp_Object Qfile_error; | ||
| 4043 | extern Lisp_Object Qfile_notify_error; | ||
| 4044 | extern Lisp_Object Qfile_exists_p; | ||
| 4045 | extern Lisp_Object Qfile_directory_p; | ||
| 4046 | extern Lisp_Object Qinsert_file_contents; | ||
| 4047 | extern Lisp_Object Qfile_name_history; | ||
| 4048 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); | 4038 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); |
| 4049 | extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, | 4039 | extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, |
| 4050 | Lisp_Object, Lisp_Object, Lisp_Object, | 4040 | Lisp_Object, Lisp_Object, Lisp_Object, |
| @@ -4061,7 +4051,6 @@ extern bool file_accessible_directory_p (Lisp_Object); | |||
| 4061 | extern void init_fileio (void); | 4051 | extern void init_fileio (void); |
| 4062 | extern void syms_of_fileio (void); | 4052 | extern void syms_of_fileio (void); |
| 4063 | extern Lisp_Object make_temp_name (Lisp_Object, bool); | 4053 | extern Lisp_Object make_temp_name (Lisp_Object, bool); |
| 4064 | extern Lisp_Object Qdelete_file; | ||
| 4065 | 4054 | ||
| 4066 | /* Defined in search.c. */ | 4055 | /* Defined in search.c. */ |
| 4067 | extern void shrink_regexp_cache (void); | 4056 | extern void shrink_regexp_cache (void); |
| @@ -4091,7 +4080,6 @@ extern void clear_regexp_cache (void); | |||
| 4091 | 4080 | ||
| 4092 | /* Defined in minibuf.c. */ | 4081 | /* Defined in minibuf.c. */ |
| 4093 | 4082 | ||
| 4094 | extern Lisp_Object Qcompletion_ignore_case; | ||
| 4095 | extern Lisp_Object Vminibuffer_list; | 4083 | extern Lisp_Object Vminibuffer_list; |
| 4096 | extern Lisp_Object last_minibuf_string; | 4084 | extern Lisp_Object last_minibuf_string; |
| 4097 | extern Lisp_Object get_minibuffer (EMACS_INT); | 4085 | extern Lisp_Object get_minibuffer (EMACS_INT); |
| @@ -4100,15 +4088,10 @@ extern void syms_of_minibuf (void); | |||
| 4100 | 4088 | ||
| 4101 | /* Defined in callint.c. */ | 4089 | /* Defined in callint.c. */ |
| 4102 | 4090 | ||
| 4103 | extern Lisp_Object Qminus, Qplus; | ||
| 4104 | extern Lisp_Object Qprogn; | ||
| 4105 | extern Lisp_Object Qwhen; | ||
| 4106 | extern Lisp_Object Qmouse_leave_buffer_hook; | ||
| 4107 | extern void syms_of_callint (void); | 4091 | extern void syms_of_callint (void); |
| 4108 | 4092 | ||
| 4109 | /* Defined in casefiddle.c. */ | 4093 | /* Defined in casefiddle.c. */ |
| 4110 | 4094 | ||
| 4111 | extern Lisp_Object Qidentity; | ||
| 4112 | extern void syms_of_casefiddle (void); | 4095 | extern void syms_of_casefiddle (void); |
| 4113 | extern void keys_of_casefiddle (void); | 4096 | extern void keys_of_casefiddle (void); |
| 4114 | 4097 | ||
| @@ -4122,8 +4105,6 @@ extern void syms_of_casetab (void); | |||
| 4122 | extern Lisp_Object echo_message_buffer; | 4105 | extern Lisp_Object echo_message_buffer; |
| 4123 | extern struct kboard *echo_kboard; | 4106 | extern struct kboard *echo_kboard; |
| 4124 | extern void cancel_echoing (void); | 4107 | extern void cancel_echoing (void); |
| 4125 | extern Lisp_Object Qdisabled, QCfilter; | ||
| 4126 | extern Lisp_Object Qup, Qdown; | ||
| 4127 | extern Lisp_Object last_undo_boundary; | 4108 | extern Lisp_Object last_undo_boundary; |
| 4128 | extern bool input_pending; | 4109 | extern bool input_pending; |
| 4129 | #ifdef HAVE_STACK_OVERFLOW_HANDLING | 4110 | #ifdef HAVE_STACK_OVERFLOW_HANDLING |
| @@ -4157,7 +4138,6 @@ extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); | |||
| 4157 | extern void syms_of_indent (void); | 4138 | extern void syms_of_indent (void); |
| 4158 | 4139 | ||
| 4159 | /* Defined in frame.c. */ | 4140 | /* Defined in frame.c. */ |
| 4160 | extern Lisp_Object Qonly, Qnone; | ||
| 4161 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); | 4141 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); |
| 4162 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); | 4142 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); |
| 4163 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); | 4143 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); |
| @@ -4173,9 +4153,7 @@ extern bool display_arg; | |||
| 4173 | #endif | 4153 | #endif |
| 4174 | extern Lisp_Object decode_env_path (const char *, const char *, bool); | 4154 | extern Lisp_Object decode_env_path (const char *, const char *, bool); |
| 4175 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 4155 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 4176 | extern Lisp_Object Qfile_name_handler_alist; | ||
| 4177 | extern _Noreturn void terminate_due_to_signal (int, int); | 4156 | extern _Noreturn void terminate_due_to_signal (int, int); |
| 4178 | extern Lisp_Object Qkill_emacs; | ||
| 4179 | #ifdef WINDOWSNT | 4157 | #ifdef WINDOWSNT |
| 4180 | extern Lisp_Object Vlibrary_cache; | 4158 | extern Lisp_Object Vlibrary_cache; |
| 4181 | #endif | 4159 | #endif |
| @@ -4210,7 +4188,6 @@ extern bool inhibit_window_system; | |||
| 4210 | extern bool running_asynch_code; | 4188 | extern bool running_asynch_code; |
| 4211 | 4189 | ||
| 4212 | /* Defined in process.c. */ | 4190 | /* Defined in process.c. */ |
| 4213 | extern Lisp_Object QCtype, Qlocal; | ||
| 4214 | extern void kill_buffer_processes (Lisp_Object); | 4191 | extern void kill_buffer_processes (Lisp_Object); |
| 4215 | extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, | 4192 | extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, |
| 4216 | struct Lisp_Process *, int); | 4193 | struct Lisp_Process *, int); |
| @@ -4246,7 +4223,6 @@ extern void set_initial_environment (void); | |||
| 4246 | extern void syms_of_callproc (void); | 4223 | extern void syms_of_callproc (void); |
| 4247 | 4224 | ||
| 4248 | /* Defined in doc.c. */ | 4225 | /* Defined in doc.c. */ |
| 4249 | extern Lisp_Object Qfunction_documentation; | ||
| 4250 | extern Lisp_Object read_doc_string (Lisp_Object); | 4226 | extern Lisp_Object read_doc_string (Lisp_Object); |
| 4251 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); | 4227 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); |
| 4252 | extern void syms_of_doc (void); | 4228 | extern void syms_of_doc (void); |
| @@ -4267,8 +4243,6 @@ extern void init_macros (void); | |||
| 4267 | extern void syms_of_macros (void); | 4243 | extern void syms_of_macros (void); |
| 4268 | 4244 | ||
| 4269 | /* Defined in undo.c. */ | 4245 | /* Defined in undo.c. */ |
| 4270 | extern Lisp_Object Qapply; | ||
| 4271 | extern Lisp_Object Qinhibit_read_only; | ||
| 4272 | extern void truncate_undo_list (struct buffer *); | 4246 | extern void truncate_undo_list (struct buffer *); |
| 4273 | extern void record_insert (ptrdiff_t, ptrdiff_t); | 4247 | extern void record_insert (ptrdiff_t, ptrdiff_t); |
| 4274 | extern void record_delete (ptrdiff_t, Lisp_Object, bool); | 4248 | extern void record_delete (ptrdiff_t, Lisp_Object, bool); |
| @@ -4278,11 +4252,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t, | |||
| 4278 | Lisp_Object, Lisp_Object, | 4252 | Lisp_Object, Lisp_Object, |
| 4279 | Lisp_Object); | 4253 | Lisp_Object); |
| 4280 | extern void syms_of_undo (void); | 4254 | extern void syms_of_undo (void); |
| 4281 | /* Defined in textprop.c. */ | ||
| 4282 | extern Lisp_Object Qmouse_face; | ||
| 4283 | extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; | ||
| 4284 | extern Lisp_Object Qminibuffer_prompt; | ||
| 4285 | 4255 | ||
| 4256 | /* Defined in textprop.c. */ | ||
| 4286 | extern void report_interval_modification (Lisp_Object, Lisp_Object); | 4257 | extern void report_interval_modification (Lisp_Object, Lisp_Object); |
| 4287 | 4258 | ||
| 4288 | /* Defined in menu.c. */ | 4259 | /* Defined in menu.c. */ |
| @@ -4366,9 +4337,6 @@ extern void init_font (void); | |||
| 4366 | #ifdef HAVE_WINDOW_SYSTEM | 4337 | #ifdef HAVE_WINDOW_SYSTEM |
| 4367 | /* Defined in fontset.c. */ | 4338 | /* Defined in fontset.c. */ |
| 4368 | extern void syms_of_fontset (void); | 4339 | extern void syms_of_fontset (void); |
| 4369 | |||
| 4370 | /* Defined in xfns.c, w32fns.c, or macfns.c. */ | ||
| 4371 | extern Lisp_Object Qfont_param; | ||
| 4372 | #endif | 4340 | #endif |
| 4373 | 4341 | ||
| 4374 | /* Defined in gfilenotify.c */ | 4342 | /* Defined in gfilenotify.c */ |
| @@ -4388,16 +4356,6 @@ extern void syms_of_w32notify (void); | |||
| 4388 | #endif | 4356 | #endif |
| 4389 | 4357 | ||
| 4390 | /* Defined in xfaces.c. */ | 4358 | /* Defined in xfaces.c. */ |
| 4391 | extern Lisp_Object Qdefault, Qfringe; | ||
| 4392 | extern Lisp_Object Qscroll_bar, Qcursor; | ||
| 4393 | extern Lisp_Object Qmode_line_inactive; | ||
| 4394 | extern Lisp_Object Qface; | ||
| 4395 | extern Lisp_Object Qnormal; | ||
| 4396 | extern Lisp_Object QCfamily, QCweight, QCslant; | ||
| 4397 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; | ||
| 4398 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | ||
| 4399 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | ||
| 4400 | extern Lisp_Object Qoblique, Qitalic; | ||
| 4401 | extern Lisp_Object Vface_alternative_font_family_alist; | 4359 | extern Lisp_Object Vface_alternative_font_family_alist; |
| 4402 | extern Lisp_Object Vface_alternative_font_registry_alist; | 4360 | extern Lisp_Object Vface_alternative_font_registry_alist; |
| 4403 | extern void syms_of_xfaces (void); | 4361 | extern void syms_of_xfaces (void); |
diff --git a/src/lread.c b/src/lread.c index 6463e1051b5..7f7bd8985d9 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -18,6 +18,8 @@ GNU General Public License for more details. | |||
| 18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License |
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | /* Tell globals.h to define tables needed by init_obarray. */ | ||
| 22 | #define DEFINE_SYMBOLS | ||
| 21 | 23 | ||
| 22 | #include <config.h> | 24 | #include <config.h> |
| 23 | #include "sysstdio.h" | 25 | #include "sysstdio.h" |
| @@ -64,32 +66,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 64 | #define file_tell ftell | 66 | #define file_tell ftell |
| 65 | #endif | 67 | #endif |
| 66 | 68 | ||
| 67 | /* Hash table read constants. */ | ||
| 68 | static Lisp_Object Qhash_table, Qdata; | ||
| 69 | static Lisp_Object Qtest; | ||
| 70 | Lisp_Object Qsize; | ||
| 71 | static Lisp_Object Qweakness; | ||
| 72 | static Lisp_Object Qrehash_size; | ||
| 73 | static Lisp_Object Qrehash_threshold; | ||
| 74 | |||
| 75 | static Lisp_Object Qread_char, Qget_file_char, Qcurrent_load_list; | ||
| 76 | Lisp_Object Qstandard_input; | ||
| 77 | Lisp_Object Qvariable_documentation; | ||
| 78 | static Lisp_Object Qascii_character, Qload, Qload_file_name; | ||
| 79 | Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; | ||
| 80 | static Lisp_Object Qinhibit_file_name_operation; | ||
| 81 | static Lisp_Object Qeval_buffer_list; | ||
| 82 | Lisp_Object Qlexical_binding; | ||
| 83 | static Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ | ||
| 84 | |||
| 85 | /* Used instead of Qget_file_char while loading *.elc files compiled | ||
| 86 | by Emacs 21 or older. */ | ||
| 87 | static Lisp_Object Qget_emacs_mule_file_char; | ||
| 88 | |||
| 89 | static Lisp_Object Qload_force_doc_strings; | ||
| 90 | |||
| 91 | static Lisp_Object Qload_in_progress; | ||
| 92 | |||
| 93 | /* The association list of objects read with the #n=object form. | 69 | /* The association list of objects read with the #n=object form. |
| 94 | Each member of the list has the form (n . object), and is used to | 70 | Each member of the list has the form (n . object), and is used to |
| 95 | look up the object for the corresponding #n# construct. | 71 | look up the object for the corresponding #n# construct. |
| @@ -133,7 +109,6 @@ static file_offset prev_saved_doc_string_position; | |||
| 133 | Fread initializes this to false, so we need not specbind it | 109 | Fread initializes this to false, so we need not specbind it |
| 134 | or worry about what happens to it when there is an error. */ | 110 | or worry about what happens to it when there is an error. */ |
| 135 | static bool new_backquote_flag; | 111 | static bool new_backquote_flag; |
| 136 | static Lisp_Object Qold_style_backquotes; | ||
| 137 | 112 | ||
| 138 | /* A list of file names for files being loaded in Fload. Used to | 113 | /* A list of file names for files being loaded in Fload. Used to |
| 139 | check for recursive loads. */ | 114 | check for recursive loads. */ |
| @@ -1430,8 +1405,6 @@ directories, make sure the PREDICATE function returns `dir-ok' for them. */) | |||
| 1430 | return file; | 1405 | return file; |
| 1431 | } | 1406 | } |
| 1432 | 1407 | ||
| 1433 | static Lisp_Object Qdir_ok; | ||
| 1434 | |||
| 1435 | /* Search for a file whose name is STR, looking in directories | 1408 | /* Search for a file whose name is STR, looking in directories |
| 1436 | in the Lisp list PATH, and trying suffixes from SUFFIX. | 1409 | in the Lisp list PATH, and trying suffixes from SUFFIX. |
| 1437 | On success, return a file descriptor (or 1 or -2 as described below). | 1410 | On success, return a file descriptor (or 1 or -2 as described below). |
| @@ -3792,30 +3765,38 @@ check_obarray (Lisp_Object obarray) | |||
| 3792 | return obarray; | 3765 | return obarray; |
| 3793 | } | 3766 | } |
| 3794 | 3767 | ||
| 3795 | /* Intern a symbol with name STRING in OBARRAY using bucket INDEX. */ | 3768 | /* Intern symbol SYM in OBARRAY using bucket INDEX. */ |
| 3796 | 3769 | ||
| 3797 | Lisp_Object | 3770 | static Lisp_Object |
| 3798 | intern_driver (Lisp_Object string, Lisp_Object obarray, ptrdiff_t index) | 3771 | intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index) |
| 3799 | { | 3772 | { |
| 3800 | Lisp_Object *ptr, sym = Fmake_symbol (string); | 3773 | Lisp_Object *ptr; |
| 3801 | 3774 | ||
| 3802 | XSYMBOL (sym)->interned = (EQ (obarray, initial_obarray) | 3775 | XSYMBOL (sym)->interned = (EQ (obarray, initial_obarray) |
| 3803 | ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY | 3776 | ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY |
| 3804 | : SYMBOL_INTERNED); | 3777 | : SYMBOL_INTERNED); |
| 3805 | 3778 | ||
| 3806 | if ((SREF (string, 0) == ':') && EQ (obarray, initial_obarray)) | 3779 | if (SREF (SYMBOL_NAME (sym), 0) == ':' && EQ (obarray, initial_obarray)) |
| 3807 | { | 3780 | { |
| 3808 | XSYMBOL (sym)->constant = 1; | 3781 | XSYMBOL (sym)->constant = 1; |
| 3809 | XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL; | 3782 | XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL; |
| 3810 | SET_SYMBOL_VAL (XSYMBOL (sym), sym); | 3783 | SET_SYMBOL_VAL (XSYMBOL (sym), sym); |
| 3811 | } | 3784 | } |
| 3812 | 3785 | ||
| 3813 | ptr = aref_addr (obarray, index); | 3786 | ptr = aref_addr (obarray, XINT (index)); |
| 3814 | set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL); | 3787 | set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL); |
| 3815 | *ptr = sym; | 3788 | *ptr = sym; |
| 3816 | return sym; | 3789 | return sym; |
| 3817 | } | 3790 | } |
| 3818 | 3791 | ||
| 3792 | /* Intern a symbol with name STRING in OBARRAY using bucket INDEX. */ | ||
| 3793 | |||
| 3794 | Lisp_Object | ||
| 3795 | intern_driver (Lisp_Object string, Lisp_Object obarray, Lisp_Object index) | ||
| 3796 | { | ||
| 3797 | return intern_sym (Fmake_symbol (string), obarray, index); | ||
| 3798 | } | ||
| 3799 | |||
| 3819 | /* Intern the C string STR: return a symbol with that name, | 3800 | /* Intern the C string STR: return a symbol with that name, |
| 3820 | interned in the current obarray. */ | 3801 | interned in the current obarray. */ |
| 3821 | 3802 | ||
| @@ -3826,7 +3807,7 @@ intern_1 (const char *str, ptrdiff_t len) | |||
| 3826 | Lisp_Object tem = oblookup (obarray, str, len, len); | 3807 | Lisp_Object tem = oblookup (obarray, str, len, len); |
| 3827 | 3808 | ||
| 3828 | return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len), | 3809 | return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len), |
| 3829 | obarray, XINT (tem)); | 3810 | obarray, tem); |
| 3830 | } | 3811 | } |
| 3831 | 3812 | ||
| 3832 | Lisp_Object | 3813 | Lisp_Object |
| @@ -3840,10 +3821,27 @@ intern_c_string_1 (const char *str, ptrdiff_t len) | |||
| 3840 | /* Creating a non-pure string from a string literal not implemented yet. | 3821 | /* Creating a non-pure string from a string literal not implemented yet. |
| 3841 | We could just use make_string here and live with the extra copy. */ | 3822 | We could just use make_string here and live with the extra copy. */ |
| 3842 | eassert (!NILP (Vpurify_flag)); | 3823 | eassert (!NILP (Vpurify_flag)); |
| 3843 | tem = intern_driver (make_pure_c_string (str, len), obarray, XINT (tem)); | 3824 | tem = intern_driver (make_pure_c_string (str, len), obarray, tem); |
| 3844 | } | 3825 | } |
| 3845 | return tem; | 3826 | return tem; |
| 3846 | } | 3827 | } |
| 3828 | |||
| 3829 | static void | ||
| 3830 | define_symbol (Lisp_Object sym, char const *str) | ||
| 3831 | { | ||
| 3832 | ptrdiff_t len = strlen (str); | ||
| 3833 | Lisp_Object string = make_pure_c_string (str, len); | ||
| 3834 | init_symbol (sym, string); | ||
| 3835 | |||
| 3836 | /* Qunbound is uninterned, so that it's not confused with any symbol | ||
| 3837 | 'unbound' created by a Lisp program. */ | ||
| 3838 | if (! EQ (sym, Qunbound)) | ||
| 3839 | { | ||
| 3840 | Lisp_Object bucket = oblookup (initial_obarray, str, len, len); | ||
| 3841 | eassert (INTEGERP (bucket)); | ||
| 3842 | intern_sym (sym, initial_obarray, bucket); | ||
| 3843 | } | ||
| 3844 | } | ||
| 3847 | 3845 | ||
| 3848 | DEFUN ("intern", Fintern, Sintern, 1, 2, 0, | 3846 | DEFUN ("intern", Fintern, Sintern, 1, 2, 0, |
| 3849 | doc: /* Return the canonical symbol whose name is STRING. | 3847 | doc: /* Return the canonical symbol whose name is STRING. |
| @@ -3859,8 +3857,8 @@ it defaults to the value of `obarray'. */) | |||
| 3859 | 3857 | ||
| 3860 | tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); | 3858 | tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); |
| 3861 | if (!SYMBOLP (tem)) | 3859 | if (!SYMBOLP (tem)) |
| 3862 | tem = intern_driver (NILP (Vpurify_flag) ? string | 3860 | tem = intern_driver (NILP (Vpurify_flag) ? string : Fpurecopy (string), |
| 3863 | : Fpurecopy (string), obarray, XINT (tem)); | 3861 | obarray, tem); |
| 3864 | return tem; | 3862 | return tem; |
| 3865 | } | 3863 | } |
| 3866 | 3864 | ||
| @@ -4059,24 +4057,17 @@ init_obarray (void) | |||
| 4059 | initial_obarray = Vobarray; | 4057 | initial_obarray = Vobarray; |
| 4060 | staticpro (&initial_obarray); | 4058 | staticpro (&initial_obarray); |
| 4061 | 4059 | ||
| 4062 | Qunbound = Fmake_symbol (build_pure_c_string ("unbound")); | 4060 | for (int i = 0; i < ARRAYELTS (lispsym); i++) |
| 4063 | /* Set temporary dummy values to Qnil and Vpurify_flag to satisfy the | 4061 | define_symbol (builtin_lisp_symbol (i), defsym_name[i]); |
| 4064 | NILP (Vpurify_flag) check in intern_c_string. */ | 4062 | |
| 4065 | Qnil = make_number (-1); Vpurify_flag = make_number (1); | 4063 | DEFSYM (Qunbound, "unbound"); |
| 4066 | Qnil = intern_c_string ("nil"); | 4064 | |
| 4067 | 4065 | DEFSYM (Qnil, "nil"); | |
| 4068 | /* Fmake_symbol inits fields of new symbols with Qunbound and Qnil, | ||
| 4069 | so those two need to be fixed manually. */ | ||
| 4070 | SET_SYMBOL_VAL (XSYMBOL (Qunbound), Qunbound); | ||
| 4071 | set_symbol_function (Qunbound, Qnil); | ||
| 4072 | set_symbol_plist (Qunbound, Qnil); | ||
| 4073 | SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil); | 4066 | SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil); |
| 4074 | XSYMBOL (Qnil)->constant = 1; | 4067 | XSYMBOL (Qnil)->constant = 1; |
| 4075 | XSYMBOL (Qnil)->declared_special = true; | 4068 | XSYMBOL (Qnil)->declared_special = true; |
| 4076 | set_symbol_plist (Qnil, Qnil); | ||
| 4077 | set_symbol_function (Qnil, Qnil); | ||
| 4078 | 4069 | ||
| 4079 | Qt = intern_c_string ("t"); | 4070 | DEFSYM (Qt, "t"); |
| 4080 | SET_SYMBOL_VAL (XSYMBOL (Qt), Qt); | 4071 | SET_SYMBOL_VAL (XSYMBOL (Qt), Qt); |
| 4081 | XSYMBOL (Qt)->constant = 1; | 4072 | XSYMBOL (Qt)->constant = 1; |
| 4082 | XSYMBOL (Qt)->declared_special = true; | 4073 | XSYMBOL (Qt)->declared_special = true; |
| @@ -4729,7 +4720,11 @@ that are loaded before your customizations are read! */); | |||
| 4729 | DEFSYM (Qstandard_input, "standard-input"); | 4720 | DEFSYM (Qstandard_input, "standard-input"); |
| 4730 | DEFSYM (Qread_char, "read-char"); | 4721 | DEFSYM (Qread_char, "read-char"); |
| 4731 | DEFSYM (Qget_file_char, "get-file-char"); | 4722 | DEFSYM (Qget_file_char, "get-file-char"); |
| 4723 | |||
| 4724 | /* Used instead of Qget_file_char while loading *.elc files compiled | ||
| 4725 | by Emacs 21 or older. */ | ||
| 4732 | DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char"); | 4726 | DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char"); |
| 4727 | |||
| 4733 | DEFSYM (Qload_force_doc_strings, "load-force-doc-strings"); | 4728 | DEFSYM (Qload_force_doc_strings, "load-force-doc-strings"); |
| 4734 | 4729 | ||
| 4735 | DEFSYM (Qbackquote, "`"); | 4730 | DEFSYM (Qbackquote, "`"); |
diff --git a/src/macfont.m b/src/macfont.m index fb28dc85d0f..f569934128f 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -40,9 +40,6 @@ Original author: YAMAMOTO Mitsuharu | |||
| 40 | 40 | ||
| 41 | static struct font_driver macfont_driver; | 41 | static struct font_driver macfont_driver; |
| 42 | 42 | ||
| 43 | /* Core Text, for Mac OS X. */ | ||
| 44 | static Lisp_Object Qmac_ct; | ||
| 45 | |||
| 46 | static double mac_ctfont_get_advance_width_for_glyph (CTFontRef, CGGlyph); | 43 | static double mac_ctfont_get_advance_width_for_glyph (CTFontRef, CGGlyph); |
| 47 | static CGRect mac_ctfont_get_bounding_rect_for_glyph (CTFontRef, CGGlyph); | 44 | static CGRect mac_ctfont_get_bounding_rect_for_glyph (CTFontRef, CGGlyph); |
| 48 | static CFArrayRef mac_ctfont_create_available_families (void); | 45 | static CFArrayRef mac_ctfont_create_available_families (void); |
| @@ -69,18 +66,6 @@ static CGGlyph mac_ctfont_get_glyph_for_cid (CTFontRef, | |||
| 69 | CGFontIndex); | 66 | CGFontIndex); |
| 70 | #endif | 67 | #endif |
| 71 | 68 | ||
| 72 | /* The font property key specifying the font design destination. The | ||
| 73 | value is an unsigned integer code: 0 for WYSIWYG, and 1 for Video | ||
| 74 | text. (See the documentation of X Logical Font Description | ||
| 75 | Conventions.) In the Mac font driver, 1 means the screen font is | ||
| 76 | used for calculating some glyph metrics. You can see the | ||
| 77 | difference with Monaco 8pt or 9pt, for example. */ | ||
| 78 | static Lisp_Object QCdestination; | ||
| 79 | |||
| 80 | /* The boolean-valued font property key specifying the use of | ||
| 81 | leading. */ | ||
| 82 | static Lisp_Object QCminspace; | ||
| 83 | |||
| 84 | struct macfont_metrics; | 69 | struct macfont_metrics; |
| 85 | 70 | ||
| 86 | /* The actual structure for Mac font that can be cast to struct font. */ | 71 | /* The actual structure for Mac font that can be cast to struct font. */ |
| @@ -3927,10 +3912,19 @@ syms_of_macfont (void) | |||
| 3927 | { | 3912 | { |
| 3928 | static struct font_driver mac_font_driver; | 3913 | static struct font_driver mac_font_driver; |
| 3929 | 3914 | ||
| 3915 | /* Core Text, for Mac OS X. */ | ||
| 3930 | DEFSYM (Qmac_ct, "mac-ct"); | 3916 | DEFSYM (Qmac_ct, "mac-ct"); |
| 3931 | macfont_driver.type = Qmac_ct; | 3917 | macfont_driver.type = Qmac_ct; |
| 3932 | register_font_driver (&macfont_driver, NULL); | 3918 | register_font_driver (&macfont_driver, NULL); |
| 3933 | 3919 | ||
| 3920 | /* The font property key specifying the font design destination. The | ||
| 3921 | value is an unsigned integer code: 0 for WYSIWYG, and 1 for Video | ||
| 3922 | text. (See the documentation of X Logical Font Description | ||
| 3923 | Conventions.) In the Mac font driver, 1 means the screen font is | ||
| 3924 | used for calculating some glyph metrics. You can see the | ||
| 3925 | difference with Monaco 8pt or 9pt, for example. */ | ||
| 3934 | DEFSYM (QCdestination, ":destination"); | 3926 | DEFSYM (QCdestination, ":destination"); |
| 3927 | |||
| 3928 | /* The boolean-valued font property key specifying the use of leading. */ | ||
| 3935 | DEFSYM (QCminspace, ":minspace"); | 3929 | DEFSYM (QCminspace, ":minspace"); |
| 3936 | } | 3930 | } |
diff --git a/src/macros.c b/src/macros.c index 0801f0ac288..e5b8ab70870 100644 --- a/src/macros.c +++ b/src/macros.c | |||
| @@ -28,9 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include "window.h" | 28 | #include "window.h" |
| 29 | #include "keyboard.h" | 29 | #include "keyboard.h" |
| 30 | 30 | ||
| 31 | static Lisp_Object Qexecute_kbd_macro; | ||
| 32 | static Lisp_Object Qkbd_macro_termination_hook; | ||
| 33 | |||
| 34 | /* Number of successful iterations so far | 31 | /* Number of successful iterations so far |
| 35 | for innermost keyboard macro. | 32 | for innermost keyboard macro. |
| 36 | This is not bound at each level, | 33 | This is not bound at each level, |
| @@ -280,7 +277,7 @@ pop_kbd_macro (Lisp_Object info) | |||
| 280 | tem = XCDR (info); | 277 | tem = XCDR (info); |
| 281 | executing_kbd_macro_index = XINT (XCAR (tem)); | 278 | executing_kbd_macro_index = XINT (XCAR (tem)); |
| 282 | Vreal_this_command = XCDR (tem); | 279 | Vreal_this_command = XCDR (tem); |
| 283 | Frun_hooks (1, &Qkbd_macro_termination_hook); | 280 | run_hook (Qkbd_macro_termination_hook); |
| 284 | } | 281 | } |
| 285 | 282 | ||
| 286 | DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, | 283 | DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, |
diff --git a/src/menu.h b/src/menu.h index 182a1819b35..de586a5e101 100644 --- a/src/menu.h +++ b/src/menu.h | |||
| @@ -22,10 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include "systime.h" /* for Time */ | 22 | #include "systime.h" /* for Time */ |
| 23 | #include "../lwlib/lwlib-widget.h" | 23 | #include "../lwlib/lwlib-widget.h" |
| 24 | 24 | ||
| 25 | #ifdef HAVE_NTGUI | ||
| 26 | extern Lisp_Object Qunsupported__w32_dialog; | ||
| 27 | #endif | ||
| 28 | |||
| 29 | /* Bit fields used by terminal-specific menu_show_hook. */ | 25 | /* Bit fields used by terminal-specific menu_show_hook. */ |
| 30 | 26 | ||
| 31 | enum { | 27 | enum { |
diff --git a/src/minibuf.c b/src/minibuf.c index b43bf7c39e9..07f489258e1 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -54,37 +54,10 @@ static Lisp_Object minibuf_save_list; | |||
| 54 | 54 | ||
| 55 | EMACS_INT minibuf_level; | 55 | EMACS_INT minibuf_level; |
| 56 | 56 | ||
| 57 | /* The maximum length of a minibuffer history. */ | ||
| 58 | |||
| 59 | static Lisp_Object Qhistory_length; | ||
| 60 | |||
| 61 | /* Fread_minibuffer leaves the input here as a string. */ | 57 | /* Fread_minibuffer leaves the input here as a string. */ |
| 62 | 58 | ||
| 63 | Lisp_Object last_minibuf_string; | 59 | Lisp_Object last_minibuf_string; |
| 64 | 60 | ||
| 65 | static Lisp_Object Qminibuffer_history, Qbuffer_name_history; | ||
| 66 | |||
| 67 | static Lisp_Object Qread_file_name_internal; | ||
| 68 | |||
| 69 | /* Normal hooks for entry to and exit from minibuffer. */ | ||
| 70 | |||
| 71 | static Lisp_Object Qminibuffer_setup_hook; | ||
| 72 | static Lisp_Object Qminibuffer_exit_hook; | ||
| 73 | |||
| 74 | Lisp_Object Qcompletion_ignore_case; | ||
| 75 | static Lisp_Object Qminibuffer_completion_table; | ||
| 76 | static Lisp_Object Qminibuffer_completion_predicate; | ||
| 77 | static Lisp_Object Qminibuffer_completion_confirm; | ||
| 78 | static Lisp_Object Qcustom_variable_p; | ||
| 79 | |||
| 80 | static Lisp_Object Qminibuffer_default; | ||
| 81 | |||
| 82 | static Lisp_Object Qcurrent_input_method, Qactivate_input_method; | ||
| 83 | |||
| 84 | static Lisp_Object Qcase_fold_search; | ||
| 85 | |||
| 86 | static Lisp_Object Qread_expression_history; | ||
| 87 | |||
| 88 | /* Prompt to display in front of the mini-buffer contents. */ | 61 | /* Prompt to display in front of the mini-buffer contents. */ |
| 89 | 62 | ||
| 90 | static Lisp_Object minibuf_prompt; | 63 | static Lisp_Object minibuf_prompt; |
| @@ -699,7 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 699 | if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) | 672 | if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) |
| 700 | call1 (Qactivate_input_method, input_method); | 673 | call1 (Qactivate_input_method, input_method); |
| 701 | 674 | ||
| 702 | Frun_hooks (1, &Qminibuffer_setup_hook); | 675 | run_hook (Qminibuffer_setup_hook); |
| 703 | 676 | ||
| 704 | /* Don't allow the user to undo past this point. */ | 677 | /* Don't allow the user to undo past this point. */ |
| 705 | bset_undo_list (current_buffer, Qnil); | 678 | bset_undo_list (current_buffer, Qnil); |
| @@ -1821,8 +1794,6 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1821 | return Qt; | 1794 | return Qt; |
| 1822 | } | 1795 | } |
| 1823 | 1796 | ||
| 1824 | static Lisp_Object Qmetadata; | ||
| 1825 | |||
| 1826 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, | 1797 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, |
| 1827 | doc: /* Perform completion on buffer names. | 1798 | doc: /* Perform completion on buffer names. |
| 1828 | STRING and PREDICATE have the same meanings as in `try-completion', | 1799 | STRING and PREDICATE have the same meanings as in `try-completion', |
| @@ -1956,9 +1927,14 @@ syms_of_minibuf (void) | |||
| 1956 | Fset (Qbuffer_name_history, Qnil); | 1927 | Fset (Qbuffer_name_history, Qnil); |
| 1957 | 1928 | ||
| 1958 | DEFSYM (Qcustom_variable_p, "custom-variable-p"); | 1929 | DEFSYM (Qcustom_variable_p, "custom-variable-p"); |
| 1930 | |||
| 1931 | /* Normal hooks for entry to and exit from minibuffer. */ | ||
| 1959 | DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook"); | 1932 | DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook"); |
| 1960 | DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook"); | 1933 | DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook"); |
| 1934 | |||
| 1935 | /* The maximum length of a minibuffer history. */ | ||
| 1961 | DEFSYM (Qhistory_length, "history-length"); | 1936 | DEFSYM (Qhistory_length, "history-length"); |
| 1937 | |||
| 1962 | DEFSYM (Qcurrent_input_method, "current-input-method"); | 1938 | DEFSYM (Qcurrent_input_method, "current-input-method"); |
| 1963 | DEFSYM (Qactivate_input_method, "activate-input-method"); | 1939 | DEFSYM (Qactivate_input_method, "activate-input-method"); |
| 1964 | DEFSYM (Qcase_fold_search, "case-fold-search"); | 1940 | DEFSYM (Qcase_fold_search, "case-fold-search"); |
diff --git a/src/nsfns.m b/src/nsfns.m index 42929b9f440..828ee88e635 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -61,35 +61,6 @@ int fns_trace_num = 1; | |||
| 61 | 61 | ||
| 62 | extern NSArray *ns_send_types, *ns_return_types, *ns_drag_types; | 62 | extern NSArray *ns_send_types, *ns_return_types, *ns_drag_types; |
| 63 | 63 | ||
| 64 | extern Lisp_Object Qforeground_color; | ||
| 65 | extern Lisp_Object Qbackground_color; | ||
| 66 | extern Lisp_Object Qcursor_color; | ||
| 67 | extern Lisp_Object Qinternal_border_width; | ||
| 68 | extern Lisp_Object Qvisibility; | ||
| 69 | extern Lisp_Object Qcursor_type; | ||
| 70 | extern Lisp_Object Qicon_type; | ||
| 71 | extern Lisp_Object Qicon_name; | ||
| 72 | extern Lisp_Object Qicon_left; | ||
| 73 | extern Lisp_Object Qicon_top; | ||
| 74 | extern Lisp_Object Qtop; | ||
| 75 | extern Lisp_Object Qdisplay; | ||
| 76 | extern Lisp_Object Qvertical_scroll_bars; | ||
| 77 | extern Lisp_Object Qhorizontal_scroll_bars; | ||
| 78 | extern Lisp_Object Qauto_raise; | ||
| 79 | extern Lisp_Object Qauto_lower; | ||
| 80 | extern Lisp_Object Qbox; | ||
| 81 | extern Lisp_Object Qscroll_bar_width; | ||
| 82 | extern Lisp_Object Qscroll_bar_height; | ||
| 83 | extern Lisp_Object Qx_resource_name; | ||
| 84 | extern Lisp_Object Qface_set_after_frame_default; | ||
| 85 | extern Lisp_Object Qunderline, Qundefined; | ||
| 86 | extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth; | ||
| 87 | extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle; | ||
| 88 | |||
| 89 | |||
| 90 | Lisp_Object Qbuffered; | ||
| 91 | Lisp_Object Qfontsize; | ||
| 92 | |||
| 93 | EmacsTooltip *ns_tooltip = nil; | 64 | EmacsTooltip *ns_tooltip = nil; |
| 94 | 65 | ||
| 95 | /* Need forward declaration here to preserve organizational integrity of file */ | 66 | /* Need forward declaration here to preserve organizational integrity of file */ |
diff --git a/src/nsfont.m b/src/nsfont.m index 22b37290a6b..f5e89d32bfc 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -45,11 +45,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 45 | #define NSFONT_TRACE 0 | 45 | #define NSFONT_TRACE 0 |
| 46 | #define LCD_SMOOTHING_MARGIN 2 | 46 | #define LCD_SMOOTHING_MARGIN 2 |
| 47 | 47 | ||
| 48 | extern Lisp_Object Qns; | ||
| 49 | extern Lisp_Object Qnormal, Qbold, Qitalic; | ||
| 50 | static Lisp_Object Qapple, Qroman, Qmedium; | ||
| 51 | static Lisp_Object Qcondensed, Qexpanded; | ||
| 52 | extern Lisp_Object Qappend; | ||
| 53 | extern float ns_antialias_threshold; | 48 | extern float ns_antialias_threshold; |
| 54 | 49 | ||
| 55 | 50 | ||
| @@ -1493,7 +1488,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) | |||
| 1493 | characterIndex: (NSUInteger)charIndex | 1488 | characterIndex: (NSUInteger)charIndex |
| 1494 | { | 1489 | { |
| 1495 | len = glyphIndex+length; | 1490 | len = glyphIndex+length; |
| 1496 | for (i =glyphIndex; i<len; i++) | 1491 | for (i =glyphIndex; i<len; i++) |
| 1497 | cglyphs[i] = glyphs[i-glyphIndex]; | 1492 | cglyphs[i] = glyphs[i-glyphIndex]; |
| 1498 | if (len > maxGlyph) | 1493 | if (len > maxGlyph) |
| 1499 | maxGlyph = len; | 1494 | maxGlyph = len; |
diff --git a/src/nsimage.m b/src/nsimage.m index 2da22f239f3..f37ad38ad1e 100644 --- a/src/nsimage.m +++ b/src/nsimage.m | |||
| @@ -34,8 +34,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 34 | #include "nsterm.h" | 34 | #include "nsterm.h" |
| 35 | #include "frame.h" | 35 | #include "frame.h" |
| 36 | 36 | ||
| 37 | extern Lisp_Object QCfile, QCdata; | ||
| 38 | |||
| 39 | /* call tracing */ | 37 | /* call tracing */ |
| 40 | #if 0 | 38 | #if 0 |
| 41 | int image_trace_num = 0; | 39 | int image_trace_num = 0; |
diff --git a/src/nsmenu.m b/src/nsmenu.m index 0e2f4d1f17c..26fe26e5e0d 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -59,12 +59,6 @@ int menu_trace_num = 0; | |||
| 59 | #include "nsmenu_common.c" | 59 | #include "nsmenu_common.c" |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | extern Lisp_Object Qundefined, Qmenu_enable, Qmenu_bar_update_hook; | ||
| 63 | extern Lisp_Object QCtoggle, QCradio; | ||
| 64 | |||
| 65 | Lisp_Object Qdebug_on_next_call; | ||
| 66 | extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | ||
| 67 | |||
| 68 | extern long context_menu_value; | 62 | extern long context_menu_value; |
| 69 | EmacsMenu *mainMenu, *svcsMenu, *dockMenu; | 63 | EmacsMenu *mainMenu, *svcsMenu, *dockMenu; |
| 70 | 64 | ||
diff --git a/src/nsselect.m b/src/nsselect.m index e2e5aadc10d..1544b16dc9d 100644 --- a/src/nsselect.m +++ b/src/nsselect.m | |||
| @@ -34,8 +34,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) | |||
| 34 | #include "termhooks.h" | 34 | #include "termhooks.h" |
| 35 | #include "keyboard.h" | 35 | #include "keyboard.h" |
| 36 | 36 | ||
| 37 | static Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME; | ||
| 38 | |||
| 39 | static Lisp_Object Vselection_alist; | 37 | static Lisp_Object Vselection_alist; |
| 40 | 38 | ||
| 41 | /* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */ | 39 | /* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */ |
diff --git a/src/nsterm.h b/src/nsterm.h index 30c14249d83..9035ee1a328 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -792,7 +792,6 @@ struct glyph_string; | |||
| 792 | void ns_dump_glyphstring (struct glyph_string *s); | 792 | void ns_dump_glyphstring (struct glyph_string *s); |
| 793 | 793 | ||
| 794 | /* Implemented in nsterm, published in or needed from nsfns. */ | 794 | /* Implemented in nsterm, published in or needed from nsfns. */ |
| 795 | extern Lisp_Object Qfontsize; | ||
| 796 | extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, | 795 | extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, |
| 797 | int size, int maxnames); | 796 | int size, int maxnames); |
| 798 | extern void ns_clear_frame (struct frame *f); | 797 | extern void ns_clear_frame (struct frame *f); |
diff --git a/src/nsterm.m b/src/nsterm.m index 4a831a8667b..bf3192bf432 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -225,14 +225,6 @@ static unsigned convert_ns_to_X_keysym[] = | |||
| 225 | 0x1B, 0x1B /* escape */ | 225 | 0x1B, 0x1B /* escape */ |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static Lisp_Object Qmodifier_value; | ||
| 229 | Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper; | ||
| 230 | extern Lisp_Object Qcursor_color, Qcursor_type, Qns; | ||
| 231 | |||
| 232 | static Lisp_Object QUTF8_STRING; | ||
| 233 | static Lisp_Object Qcocoa, Qgnustep; | ||
| 234 | static Lisp_Object Qfile, Qurl; | ||
| 235 | |||
| 236 | /* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold, | 228 | /* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold, |
| 237 | the maximum font size to NOT antialias. On GNUstep there is currently | 229 | the maximum font size to NOT antialias. On GNUstep there is currently |
| 238 | no way to control this behavior. */ | 230 | no way to control this behavior. */ |
| @@ -1412,15 +1404,8 @@ x_set_window_size (struct frame *f, | |||
| 1412 | [view setBoundsOrigin: origin]; | 1404 | [view setBoundsOrigin: origin]; |
| 1413 | } | 1405 | } |
| 1414 | 1406 | ||
| 1415 | change_frame_size (f, width, height, 0, 1, 0, pixelwise); | 1407 | [view updateFrameSize: NO]; |
| 1416 | /* SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */ | ||
| 1417 | |||
| 1418 | mark_window_cursors_off (XWINDOW (f->root_window)); | ||
| 1419 | cancel_mouse_face (f); | ||
| 1420 | |||
| 1421 | unblock_input (); | 1408 | unblock_input (); |
| 1422 | |||
| 1423 | do_pending_window_change (0); | ||
| 1424 | } | 1409 | } |
| 1425 | 1410 | ||
| 1426 | 1411 | ||
diff --git a/src/print.c b/src/print.c index d3ece334eb7..963979e809a 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -75,9 +75,6 @@ static ptrdiff_t print_buffer_pos; | |||
| 75 | /* Bytes stored in print_buffer. */ | 75 | /* Bytes stored in print_buffer. */ |
| 76 | static ptrdiff_t print_buffer_pos_byte; | 76 | static ptrdiff_t print_buffer_pos_byte; |
| 77 | 77 | ||
| 78 | Lisp_Object Qprint_escape_newlines; | ||
| 79 | static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; | ||
| 80 | |||
| 81 | /* Vprint_number_table is a table, that keeps objects that are going to | 78 | /* Vprint_number_table is a table, that keeps objects that are going to |
| 82 | be printed, to allow use of #n= and #n# to express sharing. | 79 | be printed, to allow use of #n= and #n# to express sharing. |
| 83 | For any given object, the table can give the following values: | 80 | For any given object, the table can give the following values: |
| @@ -510,7 +507,7 @@ temp_output_buffer_setup (const char *bufname) | |||
| 510 | Ferase_buffer (); | 507 | Ferase_buffer (); |
| 511 | XSETBUFFER (buf, current_buffer); | 508 | XSETBUFFER (buf, current_buffer); |
| 512 | 509 | ||
| 513 | Frun_hooks (1, &Qtemp_buffer_setup_hook); | 510 | run_hook (Qtemp_buffer_setup_hook); |
| 514 | 511 | ||
| 515 | unbind_to (count, Qnil); | 512 | unbind_to (count, Qnil); |
| 516 | 513 | ||
| @@ -719,10 +716,6 @@ is used instead. */) | |||
| 719 | return object; | 716 | return object; |
| 720 | } | 717 | } |
| 721 | 718 | ||
| 722 | /* The subroutine object for external-debugging-output is kept here | ||
| 723 | for the convenience of the debugger. */ | ||
| 724 | Lisp_Object Qexternal_debugging_output; | ||
| 725 | |||
| 726 | DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, | 719 | DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, |
| 727 | doc: /* Write CHARACTER to stderr. | 720 | doc: /* Write CHARACTER to stderr. |
| 728 | You can call print while debugging emacs, and pass it this function | 721 | You can call print while debugging emacs, and pass it this function |
| @@ -2235,7 +2228,10 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun) | |||
| 2235 | void | 2228 | void |
| 2236 | init_print_once (void) | 2229 | init_print_once (void) |
| 2237 | { | 2230 | { |
| 2231 | /* The subroutine object for external-debugging-output is kept here | ||
| 2232 | for the convenience of the debugger. */ | ||
| 2238 | DEFSYM (Qexternal_debugging_output, "external-debugging-output"); | 2233 | DEFSYM (Qexternal_debugging_output, "external-debugging-output"); |
| 2234 | |||
| 2239 | defsubr (&Sexternal_debugging_output); | 2235 | defsubr (&Sexternal_debugging_output); |
| 2240 | } | 2236 | } |
| 2241 | 2237 | ||
diff --git a/src/process.c b/src/process.c index 6eb0f9e2ab4..9015383b8b5 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -140,12 +140,6 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *, | |||
| 140 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) | 140 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) |
| 141 | # pragma GCC diagnostic ignored "-Wstrict-overflow" | 141 | # pragma GCC diagnostic ignored "-Wstrict-overflow" |
| 142 | #endif | 142 | #endif |
| 143 | |||
| 144 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; | ||
| 145 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; | ||
| 146 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; | ||
| 147 | Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; | ||
| 148 | Lisp_Object QCname, QCtype; | ||
| 149 | 143 | ||
| 150 | /* True if keyboard input is on hold, zero otherwise. */ | 144 | /* True if keyboard input is on hold, zero otherwise. */ |
| 151 | 145 | ||
| @@ -191,27 +185,6 @@ process_socket (int domain, int type, int protocol) | |||
| 191 | # define socket(domain, type, protocol) process_socket (domain, type, protocol) | 185 | # define socket(domain, type, protocol) process_socket (domain, type, protocol) |
| 192 | #endif | 186 | #endif |
| 193 | 187 | ||
| 194 | Lisp_Object Qprocessp; | ||
| 195 | static Lisp_Object Qrun, Qstop, Qsignal; | ||
| 196 | static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; | ||
| 197 | Lisp_Object Qlocal; | ||
| 198 | static Lisp_Object Qipv4, Qdatagram, Qseqpacket; | ||
| 199 | static Lisp_Object Qreal, Qnetwork, Qserial; | ||
| 200 | #ifdef AF_INET6 | ||
| 201 | static Lisp_Object Qipv6; | ||
| 202 | #endif | ||
| 203 | static Lisp_Object QCport, QCprocess; | ||
| 204 | Lisp_Object QCspeed; | ||
| 205 | Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; | ||
| 206 | Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; | ||
| 207 | static Lisp_Object QCbuffer, QChost, QCservice; | ||
| 208 | static Lisp_Object QClocal, QCremote, QCcoding; | ||
| 209 | static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; | ||
| 210 | static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; | ||
| 211 | static Lisp_Object Qlast_nonmenu_event; | ||
| 212 | static Lisp_Object Qinternal_default_process_sentinel; | ||
| 213 | static Lisp_Object Qinternal_default_process_filter; | ||
| 214 | |||
| 215 | #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) | 188 | #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) |
| 216 | #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) | 189 | #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) |
| 217 | #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) | 190 | #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) |
| @@ -7228,10 +7201,7 @@ syms_of_process (void) | |||
| 7228 | DEFSYM (Qsignal, "signal"); | 7201 | DEFSYM (Qsignal, "signal"); |
| 7229 | 7202 | ||
| 7230 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it | 7203 | /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it |
| 7231 | here again. | 7204 | here again. */ |
| 7232 | |||
| 7233 | Qexit = intern_c_string ("exit"); | ||
| 7234 | staticpro (&Qexit); */ | ||
| 7235 | 7205 | ||
| 7236 | DEFSYM (Qopen, "open"); | 7206 | DEFSYM (Qopen, "open"); |
| 7237 | DEFSYM (Qclosed, "closed"); | 7207 | DEFSYM (Qclosed, "closed"); |
diff --git a/src/process.h b/src/process.h index 1c463502a5e..7803672d61a 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -197,15 +197,6 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) | |||
| 197 | when exiting. */ | 197 | when exiting. */ |
| 198 | extern bool inhibit_sentinels; | 198 | extern bool inhibit_sentinels; |
| 199 | 199 | ||
| 200 | extern Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname; | ||
| 201 | extern Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime; | ||
| 202 | extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; | ||
| 203 | extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime; | ||
| 204 | extern Lisp_Object Qtime, Qctime; | ||
| 205 | extern Lisp_Object QCspeed; | ||
| 206 | extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; | ||
| 207 | extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; | ||
| 208 | |||
| 209 | /* Exit statuses for GNU programs that exec other programs. */ | 200 | /* Exit statuses for GNU programs that exec other programs. */ |
| 210 | enum | 201 | enum |
| 211 | { | 202 | { |
diff --git a/src/profiler.c b/src/profiler.c index 3d2c001507b..1b49afe0331 100644 --- a/src/profiler.c +++ b/src/profiler.c | |||
| @@ -35,7 +35,6 @@ saturated_add (EMACS_INT a, EMACS_INT b) | |||
| 35 | 35 | ||
| 36 | typedef struct Lisp_Hash_Table log_t; | 36 | typedef struct Lisp_Hash_Table log_t; |
| 37 | 37 | ||
| 38 | static Lisp_Object Qprofiler_backtrace_equal; | ||
| 39 | static struct hash_table_test hashtest_profiler; | 38 | static struct hash_table_test hashtest_profiler; |
| 40 | 39 | ||
| 41 | static Lisp_Object | 40 | static Lisp_Object |
diff --git a/src/search.c b/src/search.c index 2e9c992dc24..0252542a361 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -84,12 +84,6 @@ static struct re_registers search_regs; | |||
| 84 | Qnil if no searching has been done yet. */ | 84 | Qnil if no searching has been done yet. */ |
| 85 | static Lisp_Object last_thing_searched; | 85 | static Lisp_Object last_thing_searched; |
| 86 | 86 | ||
| 87 | /* Error condition signaled when regexp compile_pattern fails. */ | ||
| 88 | static Lisp_Object Qinvalid_regexp; | ||
| 89 | |||
| 90 | /* Error condition used for failing searches. */ | ||
| 91 | static Lisp_Object Qsearch_failed; | ||
| 92 | |||
| 93 | static void set_search_regs (ptrdiff_t, ptrdiff_t); | 87 | static void set_search_regs (ptrdiff_t, ptrdiff_t); |
| 94 | static void save_search_regs (void); | 88 | static void save_search_regs (void); |
| 95 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, ptrdiff_t, | 89 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, ptrdiff_t, |
| @@ -3329,7 +3323,10 @@ syms_of_search (void) | |||
| 3329 | } | 3323 | } |
| 3330 | searchbuf_head = &searchbufs[0]; | 3324 | searchbuf_head = &searchbufs[0]; |
| 3331 | 3325 | ||
| 3326 | /* Error condition used for failing searches. */ | ||
| 3332 | DEFSYM (Qsearch_failed, "search-failed"); | 3327 | DEFSYM (Qsearch_failed, "search-failed"); |
| 3328 | |||
| 3329 | /* Error condition signaled when regexp compile_pattern fails. */ | ||
| 3333 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); | 3330 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); |
| 3334 | 3331 | ||
| 3335 | Fput (Qsearch_failed, Qerror_conditions, | 3332 | Fput (Qsearch_failed, Qerror_conditions, |
diff --git a/src/sound.c b/src/sound.c index 88d86f6f84a..6f7e2adecc9 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -99,12 +99,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 99 | 99 | ||
| 100 | /* BEGIN: Common Definitions */ | 100 | /* BEGIN: Common Definitions */ |
| 101 | 101 | ||
| 102 | /* Symbols. */ | ||
| 103 | |||
| 104 | static Lisp_Object QCvolume, QCdevice; | ||
| 105 | static Lisp_Object Qsound; | ||
| 106 | static Lisp_Object Qplay_sound_functions; | ||
| 107 | |||
| 108 | /* Indices of attributes in a sound attributes vector. */ | 102 | /* Indices of attributes in a sound attributes vector. */ |
| 109 | 103 | ||
| 110 | enum sound_attr | 104 | enum sound_attr |
diff --git a/src/syntax.c b/src/syntax.c index a7ca6ec9748..2f821564294 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -137,9 +137,6 @@ enum | |||
| 137 | ST_STRING_STYLE = 256 + 2 | 137 | ST_STRING_STYLE = 256 + 2 |
| 138 | }; | 138 | }; |
| 139 | 139 | ||
| 140 | static Lisp_Object Qsyntax_table_p; | ||
| 141 | static Lisp_Object Qsyntax_table, Qscan_error; | ||
| 142 | |||
| 143 | /* This is the internal form of the parse state used in parse-partial-sexp. */ | 140 | /* This is the internal form of the parse state used in parse-partial-sexp. */ |
| 144 | 141 | ||
| 145 | struct lisp_parse_state | 142 | struct lisp_parse_state |
| @@ -3500,11 +3497,6 @@ init_syntax_once (void) | |||
| 3500 | /* This has to be done here, before we call Fmake_char_table. */ | 3497 | /* This has to be done here, before we call Fmake_char_table. */ |
| 3501 | DEFSYM (Qsyntax_table, "syntax-table"); | 3498 | DEFSYM (Qsyntax_table, "syntax-table"); |
| 3502 | 3499 | ||
| 3503 | /* This variable is DEFSYMed in alloc.c and not initialized yet, so | ||
| 3504 | intern it here. NOTE: you must guarantee that init_syntax_once | ||
| 3505 | is called before all other users of this variable. */ | ||
| 3506 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 3507 | |||
| 3508 | /* Create objects which can be shared among syntax tables. */ | 3500 | /* Create objects which can be shared among syntax tables. */ |
| 3509 | Vsyntax_code_object = make_uninit_vector (Smax); | 3501 | Vsyntax_code_object = make_uninit_vector (Smax); |
| 3510 | for (i = 0; i < Smax; i++) | 3502 | for (i = 0; i < Smax; i++) |
diff --git a/src/term.c b/src/term.c index 48447bce5fd..d48bf7b6eaf 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -130,9 +130,6 @@ enum no_color_bit | |||
| 130 | 130 | ||
| 131 | static int max_frame_cols; | 131 | static int max_frame_cols; |
| 132 | 132 | ||
| 133 | static Lisp_Object Qtty_mode_set_strings; | ||
| 134 | static Lisp_Object Qtty_mode_reset_strings; | ||
| 135 | |||
| 136 | 133 | ||
| 137 | 134 | ||
| 138 | #ifdef HAVE_GPM | 135 | #ifdef HAVE_GPM |
| @@ -2710,12 +2707,6 @@ static const char *menu_help_message, *prev_menu_help_message; | |||
| 2710 | last menu help message. */ | 2707 | last menu help message. */ |
| 2711 | static int menu_help_paneno, menu_help_itemno; | 2708 | static int menu_help_paneno, menu_help_itemno; |
| 2712 | 2709 | ||
| 2713 | static Lisp_Object Qtty_menu_navigation_map, Qtty_menu_exit; | ||
| 2714 | static Lisp_Object Qtty_menu_prev_item, Qtty_menu_next_item; | ||
| 2715 | static Lisp_Object Qtty_menu_next_menu, Qtty_menu_prev_menu; | ||
| 2716 | static Lisp_Object Qtty_menu_select, Qtty_menu_ignore; | ||
| 2717 | static Lisp_Object Qtty_menu_mouse_movement; | ||
| 2718 | |||
| 2719 | typedef struct tty_menu_struct | 2710 | typedef struct tty_menu_struct |
| 2720 | { | 2711 | { |
| 2721 | int count; | 2712 | int count; |
diff --git a/src/terminal.c b/src/terminal.c index 65b68955dbf..92befd28543 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -37,10 +37,6 @@ static int next_terminal_id; | |||
| 37 | /* The initial terminal device, created by initial_term_init. */ | 37 | /* The initial terminal device, created by initial_term_init. */ |
| 38 | struct terminal *initial_terminal; | 38 | struct terminal *initial_terminal; |
| 39 | 39 | ||
| 40 | Lisp_Object Qrun_hook_with_args; | ||
| 41 | static Lisp_Object Qterminal_live_p; | ||
| 42 | static Lisp_Object Qdelete_terminal_functions; | ||
| 43 | |||
| 44 | static void delete_initial_terminal (struct terminal *); | 40 | static void delete_initial_terminal (struct terminal *); |
| 45 | 41 | ||
| 46 | /* This setter is used only in this file, so it can be private. */ | 42 | /* This setter is used only in this file, so it can be private. */ |
diff --git a/src/textprop.c b/src/textprop.c index 27ab08f628c..35f22bf454e 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -44,21 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | is enforced by the subrs installing properties onto the intervals. */ | 44 | is enforced by the subrs installing properties onto the intervals. */ |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | /* Types of hooks. */ | ||
| 48 | static Lisp_Object Qmouse_left; | ||
| 49 | static Lisp_Object Qmouse_entered; | ||
| 50 | Lisp_Object Qpoint_left; | ||
| 51 | Lisp_Object Qpoint_entered; | ||
| 52 | Lisp_Object Qcategory; | ||
| 53 | Lisp_Object Qlocal_map; | ||
| 54 | |||
| 55 | /* Visual properties text (including strings) may have. */ | ||
| 56 | static Lisp_Object Qforeground, Qbackground, Qunderline; | ||
| 57 | Lisp_Object Qfont; | ||
| 58 | static Lisp_Object Qstipple; | ||
| 59 | Lisp_Object Qinvisible, Qintangible, Qmouse_face; | ||
| 60 | static Lisp_Object Qread_only; | ||
| 61 | Lisp_Object Qminibuffer_prompt; | ||
| 62 | 47 | ||
| 63 | enum property_set_type | 48 | enum property_set_type |
| 64 | { | 49 | { |
| @@ -67,9 +52,6 @@ enum property_set_type | |||
| 67 | TEXT_PROPERTY_APPEND | 52 | TEXT_PROPERTY_APPEND |
| 68 | }; | 53 | }; |
| 69 | 54 | ||
| 70 | /* Sticky properties. */ | ||
| 71 | Lisp_Object Qfront_sticky, Qrear_nonsticky; | ||
| 72 | |||
| 73 | /* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to | 55 | /* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to |
| 74 | the o1's cdr. Otherwise, return zero. This is handy for | 56 | the o1's cdr. Otherwise, return zero. This is handy for |
| 75 | traversing plists. */ | 57 | traversing plists. */ |
| @@ -2383,7 +2365,7 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and | |||
| 2383 | interval_insert_in_front_hooks = Qnil; | 2365 | interval_insert_in_front_hooks = Qnil; |
| 2384 | 2366 | ||
| 2385 | 2367 | ||
| 2386 | /* Common attributes one might give text */ | 2368 | /* Common attributes one might give text. */ |
| 2387 | 2369 | ||
| 2388 | DEFSYM (Qforeground, "foreground"); | 2370 | DEFSYM (Qforeground, "foreground"); |
| 2389 | DEFSYM (Qbackground, "background"); | 2371 | DEFSYM (Qbackground, "background"); |
| @@ -2401,7 +2383,7 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and | |||
| 2401 | DEFSYM (Qmouse_face, "mouse-face"); | 2383 | DEFSYM (Qmouse_face, "mouse-face"); |
| 2402 | DEFSYM (Qminibuffer_prompt, "minibuffer-prompt"); | 2384 | DEFSYM (Qminibuffer_prompt, "minibuffer-prompt"); |
| 2403 | 2385 | ||
| 2404 | /* Properties that text might use to specify certain actions */ | 2386 | /* Properties that text might use to specify certain actions. */ |
| 2405 | 2387 | ||
| 2406 | DEFSYM (Qmouse_left, "mouse-left"); | 2388 | DEFSYM (Qmouse_left, "mouse-left"); |
| 2407 | DEFSYM (Qmouse_entered, "mouse-entered"); | 2389 | DEFSYM (Qmouse_entered, "mouse-entered"); |
diff --git a/src/undo.c b/src/undo.c index 46b467ac6b4..948dcf9ec1a 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -34,12 +34,6 @@ static struct buffer *last_undo_buffer; | |||
| 34 | static struct buffer *last_boundary_buffer; | 34 | static struct buffer *last_boundary_buffer; |
| 35 | static ptrdiff_t last_boundary_position; | 35 | static ptrdiff_t last_boundary_position; |
| 36 | 36 | ||
| 37 | Lisp_Object Qinhibit_read_only; | ||
| 38 | |||
| 39 | /* Marker for function call undo list elements. */ | ||
| 40 | |||
| 41 | Lisp_Object Qapply; | ||
| 42 | |||
| 43 | /* The first time a command records something for undo. | 37 | /* The first time a command records something for undo. |
| 44 | it also allocates the undo-boundary object | 38 | it also allocates the undo-boundary object |
| 45 | which will be added to the list at the end of the command. | 39 | which will be added to the list at the end of the command. |
| @@ -461,6 +455,8 @@ void | |||
| 461 | syms_of_undo (void) | 455 | syms_of_undo (void) |
| 462 | { | 456 | { |
| 463 | DEFSYM (Qinhibit_read_only, "inhibit-read-only"); | 457 | DEFSYM (Qinhibit_read_only, "inhibit-read-only"); |
| 458 | |||
| 459 | /* Marker for function call undo list elements. */ | ||
| 464 | DEFSYM (Qapply, "apply"); | 460 | DEFSYM (Qapply, "apply"); |
| 465 | 461 | ||
| 466 | pending_boundary = Qnil; | 462 | pending_boundary = Qnil; |
| @@ -242,8 +242,6 @@ typedef struct _REPARSE_DATA_BUFFER { | |||
| 242 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) | 242 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) |
| 243 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); | 243 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); |
| 244 | 244 | ||
| 245 | Lisp_Object QCloaded_from; | ||
| 246 | |||
| 247 | void globals_of_w32 (void); | 245 | void globals_of_w32 (void); |
| 248 | static DWORD get_rid (PSID); | 246 | static DWORD get_rid (PSID); |
| 249 | static int is_symlink (const char *); | 247 | static int is_symlink (const char *); |
| @@ -172,7 +172,6 @@ extern void init_timers (void); | |||
| 172 | extern int _sys_read_ahead (int fd); | 172 | extern int _sys_read_ahead (int fd); |
| 173 | extern int _sys_wait_accept (int fd); | 173 | extern int _sys_wait_accept (int fd); |
| 174 | 174 | ||
| 175 | extern Lisp_Object QCloaded_from; | ||
| 176 | extern HMODULE w32_delayed_load (Lisp_Object); | 175 | extern HMODULE w32_delayed_load (Lisp_Object); |
| 177 | 176 | ||
| 178 | extern int (WINAPI *pMultiByteToWideChar)(UINT,DWORD,LPCSTR,int,LPWSTR,int); | 177 | extern int (WINAPI *pMultiByteToWideChar)(UINT,DWORD,LPCSTR,int,LPWSTR,int); |
diff --git a/src/w32fns.c b/src/w32fns.c index 26eeb5f76fb..789a91a3c96 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -93,19 +93,6 @@ extern char * w32_strerror (int error_no); | |||
| 93 | #define IDC_HAND MAKEINTRESOURCE(32649) | 93 | #define IDC_HAND MAKEINTRESOURCE(32649) |
| 94 | #endif | 94 | #endif |
| 95 | 95 | ||
| 96 | Lisp_Object Qundefined_color; | ||
| 97 | Lisp_Object Qcancel_timer; | ||
| 98 | Lisp_Object Qfont_param; | ||
| 99 | Lisp_Object Qhyper; | ||
| 100 | Lisp_Object Qsuper; | ||
| 101 | Lisp_Object Qmeta; | ||
| 102 | Lisp_Object Qalt; | ||
| 103 | Lisp_Object Qctrl; | ||
| 104 | Lisp_Object Qcontrol; | ||
| 105 | Lisp_Object Qshift; | ||
| 106 | static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes; | ||
| 107 | |||
| 108 | |||
| 109 | /* Prefix for system colors. */ | 96 | /* Prefix for system colors. */ |
| 110 | #define SYSTEM_COLOR_PREFIX "System" | 97 | #define SYSTEM_COLOR_PREFIX "System" |
| 111 | #define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1) | 98 | #define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1) |
| @@ -6141,7 +6128,7 @@ Text larger than the specified size is clipped. */) | |||
| 6141 | place the cursor there. Don't include the width of | 6128 | place the cursor there. Don't include the width of |
| 6142 | this glyph. */ | 6129 | this glyph. */ |
| 6143 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 6130 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 6144 | if (INTEGERP (last->object)) | 6131 | if (NILP (last->object)) |
| 6145 | row_width -= last->pixel_width; | 6132 | row_width -= last->pixel_width; |
| 6146 | } | 6133 | } |
| 6147 | else | 6134 | else |
| @@ -6151,7 +6138,7 @@ Text larger than the specified size is clipped. */) | |||
| 6151 | Don't count that glyph. */ | 6138 | Don't count that glyph. */ |
| 6152 | struct glyph *g = row->glyphs[TEXT_AREA]; | 6139 | struct glyph *g = row->glyphs[TEXT_AREA]; |
| 6153 | 6140 | ||
| 6154 | if (g->type == STRETCH_GLYPH && INTEGERP (g->object)) | 6141 | if (g->type == STRETCH_GLYPH && NILP (g->object)) |
| 6155 | { | 6142 | { |
| 6156 | row_width -= g->pixel_width; | 6143 | row_width -= g->pixel_width; |
| 6157 | seen_reversed_p = 1; | 6144 | seen_reversed_p = 1; |
| @@ -6200,7 +6187,7 @@ Text larger than the specified size is clipped. */) | |||
| 6200 | if (row->used[TEXT_AREA] && !row->reversed_p) | 6187 | if (row->used[TEXT_AREA] && !row->reversed_p) |
| 6201 | { | 6188 | { |
| 6202 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 6189 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 6203 | if (INTEGERP (last->object)) | 6190 | if (NILP (last->object)) |
| 6204 | row_width -= last->pixel_width; | 6191 | row_width -= last->pixel_width; |
| 6205 | } | 6192 | } |
| 6206 | 6193 | ||
| @@ -7248,7 +7235,7 @@ The return value is the hotkey-id if registered, otherwise nil. */) | |||
| 7248 | /* Notify input thread about new hot-key definition, so that it | 7235 | /* Notify input thread about new hot-key definition, so that it |
| 7249 | takes effect without needing to switch focus. */ | 7236 | takes effect without needing to switch focus. */ |
| 7250 | PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, | 7237 | PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, |
| 7251 | (WPARAM) XLI (key), 0); | 7238 | (WPARAM) XINT (key), 0); |
| 7252 | } | 7239 | } |
| 7253 | 7240 | ||
| 7254 | return key; | 7241 | return key; |
diff --git a/src/w32font.c b/src/w32font.c index 1b0a8a2e7c4..ab772679908 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -57,51 +57,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 57 | #define JOHAB_CHARSET 130 | 57 | #define JOHAB_CHARSET 130 |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | Lisp_Object Qgdi; | ||
| 61 | Lisp_Object Quniscribe; | ||
| 62 | static Lisp_Object QCformat; | ||
| 63 | static Lisp_Object Qmonospace, Qsansserif, Qmono, Qsans, Qsans_serif; | ||
| 64 | static Lisp_Object Qserif, Qscript, Qdecorative; | ||
| 65 | static Lisp_Object Qraster, Qoutline, Qunknown; | ||
| 66 | |||
| 67 | /* antialiasing */ | ||
| 68 | static Lisp_Object Qstandard, Qsubpixel, Qnatural; | ||
| 69 | |||
| 70 | /* languages */ | ||
| 71 | static Lisp_Object Qzh; | ||
| 72 | |||
| 73 | /* scripts */ | ||
| 74 | static Lisp_Object Qgreek, Qcoptic, Qcyrillic, Qarmenian, Qhebrew; | ||
| 75 | static Lisp_Object Qarabic, Qsyriac, Qnko, Qthaana, Qdevanagari, Qbengali; | ||
| 76 | static Lisp_Object Qgurmukhi, Qgujarati, Qoriya, Qtamil, Qtelugu; | ||
| 77 | static Lisp_Object Qkannada, Qmalayalam, Qsinhala, Qthai, Qlao; | ||
| 78 | static Lisp_Object Qtibetan, Qmyanmar, Qgeorgian, Qhangul, Qethiopic; | ||
| 79 | static Lisp_Object Qcherokee, Qcanadian_aboriginal, Qogham, Qrunic; | ||
| 80 | static Lisp_Object Qkhmer, Qmongolian, Qbraille, Qhan; | ||
| 81 | static Lisp_Object Qideographic_description, Qcjk_misc, Qkana, Qbopomofo; | ||
| 82 | static Lisp_Object Qkanbun, Qyi, Qbyzantine_musical_symbol; | ||
| 83 | static Lisp_Object Qmusical_symbol, Qmathematical, Qcham, Qphonetic; | ||
| 84 | /* Not defined in characters.el, but referenced in fontset.el. */ | ||
| 85 | static Lisp_Object Qbalinese, Qbuginese, Qbuhid, Qcuneiform, Qcypriot; | ||
| 86 | static Lisp_Object Qdeseret, Qglagolitic, Qgothic, Qhanunoo, Qkharoshthi; | ||
| 87 | static Lisp_Object Qlimbu, Qlinear_b, Qold_italic, Qold_persian, Qosmanya; | ||
| 88 | static Lisp_Object Qphags_pa, Qphoenician, Qshavian, Qsyloti_nagri; | ||
| 89 | static Lisp_Object Qtagalog, Qtagbanwa, Qtai_le, Qtifinagh, Qugaritic; | ||
| 90 | |||
| 91 | /* W32 charsets: for use in Vw32_charset_info_alist. */ | ||
| 92 | static Lisp_Object Qw32_charset_ansi, Qw32_charset_default; | ||
| 93 | static Lisp_Object Qw32_charset_symbol, Qw32_charset_shiftjis; | ||
| 94 | static Lisp_Object Qw32_charset_hangeul, Qw32_charset_gb2312; | ||
| 95 | static Lisp_Object Qw32_charset_chinesebig5, Qw32_charset_oem; | ||
| 96 | static Lisp_Object Qw32_charset_easteurope, Qw32_charset_turkish; | ||
| 97 | static Lisp_Object Qw32_charset_baltic, Qw32_charset_russian; | ||
| 98 | static Lisp_Object Qw32_charset_arabic, Qw32_charset_greek; | ||
| 99 | static Lisp_Object Qw32_charset_hebrew, Qw32_charset_vietnamese; | ||
| 100 | static Lisp_Object Qw32_charset_thai, Qw32_charset_johab, Qw32_charset_mac; | ||
| 101 | |||
| 102 | /* Font spacing symbols - defined in font.c. */ | ||
| 103 | extern Lisp_Object Qc, Qp, Qm; | ||
| 104 | |||
| 105 | static void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); | 60 | static void fill_in_logfont (struct frame *, LOGFONT *, Lisp_Object); |
| 106 | 61 | ||
| 107 | static BYTE w32_antialias_type (Lisp_Object); | 62 | static BYTE w32_antialias_type (Lisp_Object); |
| @@ -291,7 +246,7 @@ intern_font_name (char * string) | |||
| 291 | Lisp_Object obarray = check_obarray (Vobarray); | 246 | Lisp_Object obarray = check_obarray (Vobarray); |
| 292 | Lisp_Object tem = oblookup (obarray, SDATA (str), len, len); | 247 | Lisp_Object tem = oblookup (obarray, SDATA (str), len, len); |
| 293 | /* This code is similar to intern function from lread.c. */ | 248 | /* This code is similar to intern function from lread.c. */ |
| 294 | return SYMBOLP (tem) ? tem : intern_driver (str, obarray, XINT (tem)); | 249 | return SYMBOLP (tem) ? tem : intern_driver (str, obarray, tem); |
| 295 | } | 250 | } |
| 296 | 251 | ||
| 297 | /* w32 implementation of get_cache for font backend. | 252 | /* w32 implementation of get_cache for font backend. |
diff --git a/src/w32inevt.c b/src/w32inevt.c index daf4a5c2375..e09903f99be 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -657,11 +657,12 @@ handle_file_notifications (struct input_event *hold_quit) | |||
| 657 | Lisp_Object action = lispy_file_action (fni->Action); | 657 | Lisp_Object action = lispy_file_action (fni->Action); |
| 658 | 658 | ||
| 659 | inev.kind = FILE_NOTIFY_EVENT; | 659 | inev.kind = FILE_NOTIFY_EVENT; |
| 660 | inev.code = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); | ||
| 661 | inev.timestamp = GetTickCount (); | 660 | inev.timestamp = GetTickCount (); |
| 662 | inev.modifiers = 0; | 661 | inev.modifiers = 0; |
| 663 | inev.frame_or_window = callback; | 662 | inev.frame_or_window = callback; |
| 664 | inev.arg = Fcons (action, fname); | 663 | inev.arg = Fcons (action, fname); |
| 664 | inev.arg = list3 (make_pointer_integer (notifications_desc), | ||
| 665 | action, fname); | ||
| 665 | kbd_buffer_store_event_hold (&inev, hold_quit); | 666 | kbd_buffer_store_event_hold (&inev, hold_quit); |
| 666 | 667 | ||
| 667 | if (!fni->NextEntryOffset) | 668 | if (!fni->NextEntryOffset) |
diff --git a/src/w32menu.c b/src/w32menu.c index 72e0cab2ce8..7a946d2dc75 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -98,8 +98,6 @@ AppendMenuW_Proc unicode_append_menu = NULL; | |||
| 98 | MessageBoxW_Proc unicode_message_box = NULL; | 98 | MessageBoxW_Proc unicode_message_box = NULL; |
| 99 | #endif /* NTGUI_UNICODE */ | 99 | #endif /* NTGUI_UNICODE */ |
| 100 | 100 | ||
| 101 | Lisp_Object Qdebug_on_next_call, Qunsupported__w32_dialog; | ||
| 102 | |||
| 103 | void set_frame_menubar (struct frame *, bool, bool); | 101 | void set_frame_menubar (struct frame *, bool, bool); |
| 104 | 102 | ||
| 105 | #ifdef HAVE_DIALOGS | 103 | #ifdef HAVE_DIALOGS |
diff --git a/src/w32notify.c b/src/w32notify.c index 764ded6559f..ab6cd12ab93 100644 --- a/src/w32notify.c +++ b/src/w32notify.c | |||
| @@ -118,9 +118,7 @@ BYTE file_notifications[16384]; | |||
| 118 | DWORD notifications_size; | 118 | DWORD notifications_size; |
| 119 | void *notifications_desc; | 119 | void *notifications_desc; |
| 120 | 120 | ||
| 121 | static Lisp_Object Qfile_name, Qdirectory_name, Qattributes; | 121 | static Lisp_Object watch_list; |
| 122 | static Lisp_Object Qlast_write_time, Qlast_access_time, Qcreation_time; | ||
| 123 | static Lisp_Object Qsecurity_desc, Qsubtree, watch_list; | ||
| 124 | 122 | ||
| 125 | /* Signal to the main thread that we have file notifications for it to | 123 | /* Signal to the main thread that we have file notifications for it to |
| 126 | process. */ | 124 | process. */ |
| @@ -582,7 +580,7 @@ generate notifications correctly, though. */) | |||
| 582 | report_file_error ("Cannot watch file", Fcons (file, Qnil)); | 580 | report_file_error ("Cannot watch file", Fcons (file, Qnil)); |
| 583 | } | 581 | } |
| 584 | /* Store watch object in watch list. */ | 582 | /* Store watch object in watch list. */ |
| 585 | watch_descriptor = XIL ((EMACS_INT)dirwatch); | 583 | watch_descriptor = make_pointer_integer (dirwatch); |
| 586 | watch_object = Fcons (watch_descriptor, callback); | 584 | watch_object = Fcons (watch_descriptor, callback); |
| 587 | watch_list = Fcons (watch_object, watch_list); | 585 | watch_list = Fcons (watch_object, watch_list); |
| 588 | 586 | ||
| @@ -607,7 +605,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */) | |||
| 607 | if (!NILP (watch_object)) | 605 | if (!NILP (watch_object)) |
| 608 | { | 606 | { |
| 609 | watch_list = Fdelete (watch_object, watch_list); | 607 | watch_list = Fdelete (watch_object, watch_list); |
| 610 | dirwatch = (struct notification *)XLI (watch_descriptor); | 608 | dirwatch = (struct notification *)XINTPTR (watch_descriptor); |
| 611 | if (w32_valid_pointer_p (dirwatch, sizeof(struct notification))) | 609 | if (w32_valid_pointer_p (dirwatch, sizeof(struct notification))) |
| 612 | status = remove_watch (dirwatch); | 610 | status = remove_watch (dirwatch); |
| 613 | } | 611 | } |
| @@ -622,7 +620,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */) | |||
| 622 | Lisp_Object | 620 | Lisp_Object |
| 623 | w32_get_watch_object (void *desc) | 621 | w32_get_watch_object (void *desc) |
| 624 | { | 622 | { |
| 625 | Lisp_Object descriptor = XIL ((EMACS_INT)desc); | 623 | Lisp_Object descriptor = make_pointer_integer (desc); |
| 626 | 624 | ||
| 627 | /* This is called from the input queue handling code, inside a | 625 | /* This is called from the input queue handling code, inside a |
| 628 | critical section, so we cannot possibly QUIT if watch_list is not | 626 | critical section, so we cannot possibly QUIT if watch_list is not |
diff --git a/src/w32proc.c b/src/w32proc.c index 0c178e7a2f6..26cfa2996d0 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -72,8 +72,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD); | |||
| 72 | + ((DWORD_PTR)(var) - (section)->VirtualAddress) \ | 72 | + ((DWORD_PTR)(var) - (section)->VirtualAddress) \ |
| 73 | + (filedata).file_base)) | 73 | + (filedata).file_base)) |
| 74 | 74 | ||
| 75 | Lisp_Object Qhigh, Qlow; | ||
| 76 | |||
| 77 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ | 75 | /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ |
| 78 | static signal_handler sig_handlers[NSIG]; | 76 | static signal_handler sig_handlers[NSIG]; |
| 79 | 77 | ||
diff --git a/src/w32select.c b/src/w32select.c index f133f6d44e3..3c554c622ae 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -107,17 +107,11 @@ static Lisp_Object validate_coding_system (Lisp_Object coding_system); | |||
| 107 | static void setup_windows_coding_system (Lisp_Object coding_system, | 107 | static void setup_windows_coding_system (Lisp_Object coding_system, |
| 108 | struct coding_system * coding); | 108 | struct coding_system * coding); |
| 109 | 109 | ||
| 110 | |||
| 111 | /* A remnant from X11: Symbol for the CLIPBORD selection type. Other | ||
| 112 | selections are not used on Windows, so we don't need symbols for | ||
| 113 | PRIMARY and SECONDARY. */ | ||
| 114 | Lisp_Object QCLIPBOARD; | ||
| 115 | |||
| 116 | /* Internal pseudo-constants, initialized in globals_of_w32select() | 110 | /* Internal pseudo-constants, initialized in globals_of_w32select() |
| 117 | based on current system parameters. */ | 111 | based on current system parameters. */ |
| 118 | static LCID DEFAULT_LCID; | 112 | static LCID DEFAULT_LCID; |
| 119 | static UINT ANSICP, OEMCP; | 113 | static UINT ANSICP, OEMCP; |
| 120 | static Lisp_Object QUNICODE, QANSICP, QOEMCP; | 114 | static Lisp_Object QANSICP, QOEMCP; |
| 121 | 115 | ||
| 122 | /* A hidden window just for the clipboard management. */ | 116 | /* A hidden window just for the clipboard management. */ |
| 123 | static HWND clipboard_owner; | 117 | static HWND clipboard_owner; |
diff --git a/src/w32term.c b/src/w32term.c index e692d9df475..ce28e05a45b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -220,10 +220,6 @@ static void w32fullscreen_hook (struct frame *); | |||
| 220 | static void x_check_font (struct frame *, struct font *); | 220 | static void x_check_font (struct frame *, struct font *); |
| 221 | #endif | 221 | #endif |
| 222 | 222 | ||
| 223 | static Lisp_Object Qvendor_specific_keysyms; | ||
| 224 | static Lisp_Object Qadded, Qremoved, Qmodified; | ||
| 225 | static Lisp_Object Qrenamed_from, Qrenamed_to; | ||
| 226 | |||
| 227 | 223 | ||
| 228 | /*********************************************************************** | 224 | /*********************************************************************** |
| 229 | Debugging | 225 | Debugging |
| @@ -3251,12 +3247,11 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, | |||
| 3251 | Lisp_Object action = lispy_file_action (fni->Action); | 3247 | Lisp_Object action = lispy_file_action (fni->Action); |
| 3252 | 3248 | ||
| 3253 | event->kind = FILE_NOTIFY_EVENT; | 3249 | event->kind = FILE_NOTIFY_EVENT; |
| 3254 | event->code | ||
| 3255 | = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); | ||
| 3256 | event->timestamp = msg->msg.time; | 3250 | event->timestamp = msg->msg.time; |
| 3257 | event->modifiers = 0; | 3251 | event->modifiers = 0; |
| 3258 | event->frame_or_window = callback; | 3252 | event->frame_or_window = callback; |
| 3259 | event->arg = Fcons (action, fname); | 3253 | event->arg = list3 (make_pointer_integer (notifications_desc), |
| 3254 | action, fname); | ||
| 3260 | kbd_buffer_store_event (event); | 3255 | kbd_buffer_store_event (event); |
| 3261 | (*evcount)++; | 3256 | (*evcount)++; |
| 3262 | 3257 | ||
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 29fea6a0b11..2a7fe2e6f91 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -47,10 +47,6 @@ struct uniscribe_font_info | |||
| 47 | 47 | ||
| 48 | int uniscribe_available = 0; | 48 | int uniscribe_available = 0; |
| 49 | 49 | ||
| 50 | /* Defined in w32font.c, since it is required there as well. */ | ||
| 51 | extern Lisp_Object Quniscribe; | ||
| 52 | extern Lisp_Object Qopentype; | ||
| 53 | |||
| 54 | /* EnumFontFamiliesEx callback. */ | 50 | /* EnumFontFamiliesEx callback. */ |
| 55 | static int CALLBACK ALIGN_STACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, | 51 | static int CALLBACK ALIGN_STACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, |
| 56 | NEWTEXTMETRICEX *, | 52 | NEWTEXTMETRICEX *, |
diff --git a/src/window.c b/src/window.c index 4da33501323..4dec9768e2c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -48,20 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 48 | #include "xwidget.h" | 48 | #include "xwidget.h" |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | Lisp_Object Qwindowp, Qwindow_live_p; | ||
| 52 | static Lisp_Object Qwindow_valid_p; | ||
| 53 | static Lisp_Object Qwindow_configuration_p; | ||
| 54 | static Lisp_Object Qrecord_window_buffer; | ||
| 55 | static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; | ||
| 56 | static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; | ||
| 57 | static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; | ||
| 58 | static Lisp_Object Qwindow_sanitize_window_sizes; | ||
| 59 | static Lisp_Object Qwindow_pixel_to_total; | ||
| 60 | static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; | ||
| 61 | static Lisp_Object Qsafe, Qabove, Qbelow, Qwindow_size, Qclone_of; | ||
| 62 | static Lisp_Object Qfloor, Qceiling; | ||
| 63 | static Lisp_Object Qwindow_point_insertion_type; | ||
| 64 | |||
| 65 | static int displayed_window_lines (struct window *); | 51 | static int displayed_window_lines (struct window *); |
| 66 | static int count_windows (struct window *); | 52 | static int count_windows (struct window *); |
| 67 | static int get_leaf_windows (struct window *, struct window **, int); | 53 | static int get_leaf_windows (struct window *, struct window **, int); |
| @@ -118,15 +104,9 @@ Lisp_Object minibuf_window; | |||
| 118 | shown as the selected window when the minibuffer is selected. */ | 104 | shown as the selected window when the minibuffer is selected. */ |
| 119 | Lisp_Object minibuf_selected_window; | 105 | Lisp_Object minibuf_selected_window; |
| 120 | 106 | ||
| 121 | /* Hook run at end of temp_output_buffer_show. */ | ||
| 122 | static Lisp_Object Qtemp_buffer_show_hook; | ||
| 123 | |||
| 124 | /* Incremented for each window created. */ | 107 | /* Incremented for each window created. */ |
| 125 | static int sequence_number; | 108 | static int sequence_number; |
| 126 | 109 | ||
| 127 | /* Hook to run when window config changes. */ | ||
| 128 | static Lisp_Object Qwindow_configuration_change_hook; | ||
| 129 | |||
| 130 | /* Used by the function window_scroll_pixel_based. */ | 110 | /* Used by the function window_scroll_pixel_based. */ |
| 131 | static int window_scroll_pixel_based_preserve_x; | 111 | static int window_scroll_pixel_based_preserve_x; |
| 132 | static int window_scroll_pixel_based_preserve_y; | 112 | static int window_scroll_pixel_based_preserve_y; |
| @@ -997,7 +977,10 @@ or scroll bars. | |||
| 997 | If PIXELWISE is nil, return the largest integer smaller than WINDOW's | 977 | If PIXELWISE is nil, return the largest integer smaller than WINDOW's |
| 998 | pixel width divided by the character width of WINDOW's frame. This | 978 | pixel width divided by the character width of WINDOW's frame. This |
| 999 | means that if a column at the right of the text area is only partially | 979 | means that if a column at the right of the text area is only partially |
| 1000 | visible, that column is not counted. */) | 980 | visible, that column is not counted. |
| 981 | |||
| 982 | Note that the returned value includes the column reserved for the | ||
| 983 | continuation glyph. */) | ||
| 1001 | (Lisp_Object window, Lisp_Object pixelwise) | 984 | (Lisp_Object window, Lisp_Object pixelwise) |
| 1002 | { | 985 | { |
| 1003 | return make_number (window_body_width (decode_live_window (window), | 986 | return make_number (window_body_width (decode_live_window (window), |
| @@ -3656,7 +3639,7 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3656 | record_unwind_protect (select_window_norecord, prev_window); | 3639 | record_unwind_protect (select_window_norecord, prev_window); |
| 3657 | Fselect_window (window, Qt); | 3640 | Fselect_window (window, Qt); |
| 3658 | Fset_buffer (w->contents); | 3641 | Fset_buffer (w->contents); |
| 3659 | Frun_hooks (1, &Qtemp_buffer_show_hook); | 3642 | run_hook (Qtemp_buffer_show_hook); |
| 3660 | unbind_to (count, Qnil); | 3643 | unbind_to (count, Qnil); |
| 3661 | } | 3644 | } |
| 3662 | } | 3645 | } |
diff --git a/src/window.h b/src/window.h index 2ed0f3e9fbc..2ec28ab4e56 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -1085,7 +1085,6 @@ struct glyph *get_phys_cursor_glyph (struct window *w); | |||
| 1085 | CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW) | 1085 | CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW) |
| 1086 | 1086 | ||
| 1087 | /* These used to be in lisp.h. */ | 1087 | /* These used to be in lisp.h. */ |
| 1088 | extern Lisp_Object Qwindow_live_p; | ||
| 1089 | extern Lisp_Object Vwindow_list; | 1088 | extern Lisp_Object Vwindow_list; |
| 1090 | 1089 | ||
| 1091 | extern Lisp_Object window_list (void); | 1090 | extern Lisp_Object window_list (void); |
diff --git a/src/xdisp.c b/src/xdisp.c index bd6ab628d43..8b68ab7ddf7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -327,52 +327,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 327 | 327 | ||
| 328 | #define INFINITY 10000000 | 328 | #define INFINITY 10000000 |
| 329 | 329 | ||
| 330 | Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | ||
| 331 | Lisp_Object Qwindow_scroll_functions; | ||
| 332 | static Lisp_Object Qwindow_text_change_functions; | ||
| 333 | static Lisp_Object Qredisplay_end_trigger_functions; | ||
| 334 | Lisp_Object Qinhibit_point_motion_hooks; | ||
| 335 | static Lisp_Object QCeval, QCpropertize; | ||
| 336 | Lisp_Object QCfile, QCdata; | ||
| 337 | static Lisp_Object Qfontified; | ||
| 338 | static Lisp_Object Qgrow_only; | ||
| 339 | static Lisp_Object Qinhibit_eval_during_redisplay; | ||
| 340 | static Lisp_Object Qbuffer_position, Qposition, Qobject; | ||
| 341 | static Lisp_Object Qright_to_left, Qleft_to_right; | ||
| 342 | |||
| 343 | /* Cursor shapes. */ | ||
| 344 | Lisp_Object Qbar, Qhbar, Qbox, Qhollow; | ||
| 345 | |||
| 346 | /* Pointer shapes. */ | ||
| 347 | static Lisp_Object Qarrow, Qhand; | ||
| 348 | Lisp_Object Qtext; | ||
| 349 | |||
| 350 | /* Holds the list (error). */ | 330 | /* Holds the list (error). */ |
| 351 | static Lisp_Object list_of_error; | 331 | static Lisp_Object list_of_error; |
| 352 | 332 | ||
| 353 | Lisp_Object Qfontification_functions; | ||
| 354 | |||
| 355 | static Lisp_Object Qwrap_prefix; | ||
| 356 | static Lisp_Object Qline_prefix; | ||
| 357 | static Lisp_Object Qredisplay_internal; | ||
| 358 | |||
| 359 | /* Non-nil means don't actually do any redisplay. */ | ||
| 360 | |||
| 361 | Lisp_Object Qinhibit_redisplay; | ||
| 362 | |||
| 363 | /* Names of text properties relevant for redisplay. */ | ||
| 364 | |||
| 365 | Lisp_Object Qdisplay; | ||
| 366 | |||
| 367 | Lisp_Object Qspace, QCalign_to; | ||
| 368 | static Lisp_Object QCrelative_width, QCrelative_height; | ||
| 369 | Lisp_Object Qleft_margin, Qright_margin; | ||
| 370 | static Lisp_Object Qspace_width, Qraise; | ||
| 371 | static Lisp_Object Qslice; | ||
| 372 | Lisp_Object Qcenter; | ||
| 373 | static Lisp_Object Qmargin, Qpointer; | ||
| 374 | static Lisp_Object Qline_height; | ||
| 375 | |||
| 376 | #ifdef HAVE_WINDOW_SYSTEM | 333 | #ifdef HAVE_WINDOW_SYSTEM |
| 377 | 334 | ||
| 378 | /* Test if overflow newline into fringe. Called with iterator IT | 335 | /* Test if overflow newline into fringe. Called with iterator IT |
| @@ -406,31 +363,6 @@ static Lisp_Object Qline_height; | |||
| 406 | && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \ | 363 | && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \ |
| 407 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \ | 364 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \ |
| 408 | 365 | ||
| 409 | /* Name of the face used to highlight trailing whitespace. */ | ||
| 410 | |||
| 411 | static Lisp_Object Qtrailing_whitespace; | ||
| 412 | |||
| 413 | /* Name and number of the face used to highlight escape glyphs. */ | ||
| 414 | |||
| 415 | static Lisp_Object Qescape_glyph; | ||
| 416 | |||
| 417 | /* Name and number of the face used to highlight non-breaking spaces. */ | ||
| 418 | |||
| 419 | static Lisp_Object Qnobreak_space; | ||
| 420 | |||
| 421 | /* The symbol `image' which is the car of the lists used to represent | ||
| 422 | images in Lisp. Also a tool bar style. */ | ||
| 423 | |||
| 424 | Lisp_Object Qimage; | ||
| 425 | |||
| 426 | /* The image map types. */ | ||
| 427 | Lisp_Object QCmap; | ||
| 428 | static Lisp_Object QCpointer; | ||
| 429 | static Lisp_Object Qrect, Qcircle, Qpoly; | ||
| 430 | |||
| 431 | /* Tool bar styles */ | ||
| 432 | Lisp_Object Qboth, Qboth_horiz, Qtext_image_horiz; | ||
| 433 | |||
| 434 | /* Non-zero means print newline to stdout before next mini-buffer | 366 | /* Non-zero means print newline to stdout before next mini-buffer |
| 435 | message. */ | 367 | message. */ |
| 436 | 368 | ||
| @@ -480,21 +412,6 @@ static struct text_pos this_line_min_pos; | |||
| 480 | 412 | ||
| 481 | static struct buffer *this_line_buffer; | 413 | static struct buffer *this_line_buffer; |
| 482 | 414 | ||
| 483 | |||
| 484 | /* Values of those variables at last redisplay are stored as | ||
| 485 | properties on `overlay-arrow-position' symbol. However, if | ||
| 486 | Voverlay_arrow_position is a marker, last-arrow-position is its | ||
| 487 | numerical position. */ | ||
| 488 | |||
| 489 | static Lisp_Object Qlast_arrow_position, Qlast_arrow_string; | ||
| 490 | |||
| 491 | /* Alternative overlay-arrow-string and overlay-arrow-bitmap | ||
| 492 | properties on a symbol in overlay-arrow-variable-list. */ | ||
| 493 | |||
| 494 | static Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap; | ||
| 495 | |||
| 496 | Lisp_Object Qmenu_bar_update_hook; | ||
| 497 | |||
| 498 | /* Nonzero if an overlay arrow has been displayed in this window. */ | 415 | /* Nonzero if an overlay arrow has been displayed in this window. */ |
| 499 | 416 | ||
| 500 | static bool overlay_arrow_seen; | 417 | static bool overlay_arrow_seen; |
| @@ -570,11 +487,6 @@ static bool display_last_displayed_message_p; | |||
| 570 | 487 | ||
| 571 | static bool message_buf_print; | 488 | static bool message_buf_print; |
| 572 | 489 | ||
| 573 | /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ | ||
| 574 | |||
| 575 | static Lisp_Object Qinhibit_menubar_update; | ||
| 576 | static Lisp_Object Qmessage_truncate_lines; | ||
| 577 | |||
| 578 | /* Set to 1 in clear_message to make redisplay_internal aware | 490 | /* Set to 1 in clear_message to make redisplay_internal aware |
| 579 | of an emptied echo area. */ | 491 | of an emptied echo area. */ |
| 580 | 492 | ||
| @@ -694,8 +606,6 @@ int trace_move; | |||
| 694 | #define TRACE_MOVE(x) (void) 0 | 606 | #define TRACE_MOVE(x) (void) 0 |
| 695 | #endif | 607 | #endif |
| 696 | 608 | ||
| 697 | static Lisp_Object Qauto_hscroll_mode; | ||
| 698 | |||
| 699 | /* Buffer being redisplayed -- for redisplay_window_error. */ | 609 | /* Buffer being redisplayed -- for redisplay_window_error. */ |
| 700 | 610 | ||
| 701 | static struct buffer *displayed_buffer; | 611 | static struct buffer *displayed_buffer; |
| @@ -715,8 +625,8 @@ enum prop_handled | |||
| 715 | 625 | ||
| 716 | struct props | 626 | struct props |
| 717 | { | 627 | { |
| 718 | /* The name of the property. */ | 628 | /* The symbol index of the name of the property. */ |
| 719 | Lisp_Object *name; | 629 | short name; |
| 720 | 630 | ||
| 721 | /* A unique index for the property. */ | 631 | /* A unique index for the property. */ |
| 722 | enum prop_idx idx; | 632 | enum prop_idx idx; |
| @@ -737,14 +647,14 @@ static enum prop_handled handle_fontified_prop (struct it *); | |||
| 737 | 647 | ||
| 738 | static struct props it_props[] = | 648 | static struct props it_props[] = |
| 739 | { | 649 | { |
| 740 | {&Qfontified, FONTIFIED_PROP_IDX, handle_fontified_prop}, | 650 | {SYMBOL_INDEX (Qfontified), FONTIFIED_PROP_IDX, handle_fontified_prop}, |
| 741 | /* Handle `face' before `display' because some sub-properties of | 651 | /* Handle `face' before `display' because some sub-properties of |
| 742 | `display' need to know the face. */ | 652 | `display' need to know the face. */ |
| 743 | {&Qface, FACE_PROP_IDX, handle_face_prop}, | 653 | {SYMBOL_INDEX (Qface), FACE_PROP_IDX, handle_face_prop}, |
| 744 | {&Qdisplay, DISPLAY_PROP_IDX, handle_display_prop}, | 654 | {SYMBOL_INDEX (Qdisplay), DISPLAY_PROP_IDX, handle_display_prop}, |
| 745 | {&Qinvisible, INVISIBLE_PROP_IDX, handle_invisible_prop}, | 655 | {SYMBOL_INDEX (Qinvisible), INVISIBLE_PROP_IDX, handle_invisible_prop}, |
| 746 | {&Qcomposition, COMPOSITION_PROP_IDX, handle_composition_prop}, | 656 | {SYMBOL_INDEX (Qcomposition), COMPOSITION_PROP_IDX, handle_composition_prop}, |
| 747 | {NULL, 0, NULL} | 657 | {0, 0, NULL} |
| 748 | }; | 658 | }; |
| 749 | 659 | ||
| 750 | /* Value is the position described by X. If X is a marker, value is | 660 | /* Value is the position described by X. If X is a marker, value is |
| @@ -799,9 +709,6 @@ static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; | |||
| 799 | 709 | ||
| 800 | bool redisplaying_p; | 710 | bool redisplaying_p; |
| 801 | 711 | ||
| 802 | static Lisp_Object Qinhibit_free_realized_faces; | ||
| 803 | static Lisp_Object Qmode_line_default_help_echo; | ||
| 804 | |||
| 805 | /* If a string, XTread_socket generates an event to display that string. | 712 | /* If a string, XTread_socket generates an event to display that string. |
| 806 | (The display is done in read_char.) */ | 713 | (The display is done in read_char.) */ |
| 807 | 714 | ||
| @@ -827,15 +734,6 @@ static struct atimer *hourglass_atimer; | |||
| 827 | 734 | ||
| 828 | #endif /* HAVE_WINDOW_SYSTEM */ | 735 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 829 | 736 | ||
| 830 | /* Name of the face used to display glyphless characters. */ | ||
| 831 | static Lisp_Object Qglyphless_char; | ||
| 832 | |||
| 833 | /* Symbol for the purpose of Vglyphless_char_display. */ | ||
| 834 | static Lisp_Object Qglyphless_char_display; | ||
| 835 | |||
| 836 | /* Method symbols for Vglyphless_char_display. */ | ||
| 837 | static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; | ||
| 838 | |||
| 839 | /* Default number of seconds to wait before displaying an hourglass | 737 | /* Default number of seconds to wait before displaying an hourglass |
| 840 | cursor. */ | 738 | cursor. */ |
| 841 | #define DEFAULT_HOURGLASS_DELAY 1 | 739 | #define DEFAULT_HOURGLASS_DELAY 1 |
| @@ -2702,8 +2600,6 @@ safe__call1 (bool inhibit_quit, Lisp_Object fn, ...) | |||
| 2702 | return retval; | 2600 | return retval; |
| 2703 | } | 2601 | } |
| 2704 | 2602 | ||
| 2705 | static Lisp_Object Qeval; | ||
| 2706 | |||
| 2707 | Lisp_Object | 2603 | Lisp_Object |
| 2708 | safe_eval (Lisp_Object sexpr) | 2604 | safe_eval (Lisp_Object sexpr) |
| 2709 | { | 2605 | { |
| @@ -3626,7 +3522,8 @@ compute_stop_pos (struct it *it) | |||
| 3626 | 3522 | ||
| 3627 | /* Get properties here. */ | 3523 | /* Get properties here. */ |
| 3628 | for (p = it_props; p->handler; ++p) | 3524 | for (p = it_props; p->handler; ++p) |
| 3629 | values_here[p->idx] = textget (iv->plist, *p->name); | 3525 | values_here[p->idx] = textget (iv->plist, |
| 3526 | builtin_lisp_symbol (p->name)); | ||
| 3630 | 3527 | ||
| 3631 | /* Look for an interval following iv that has different | 3528 | /* Look for an interval following iv that has different |
| 3632 | properties. */ | 3529 | properties. */ |
| @@ -3638,9 +3535,8 @@ compute_stop_pos (struct it *it) | |||
| 3638 | { | 3535 | { |
| 3639 | for (p = it_props; p->handler; ++p) | 3536 | for (p = it_props; p->handler; ++p) |
| 3640 | { | 3537 | { |
| 3641 | Lisp_Object new_value; | 3538 | Lisp_Object new_value = textget (next_iv->plist, |
| 3642 | 3539 | builtin_lisp_symbol (p->name)); | |
| 3643 | new_value = textget (next_iv->plist, *p->name); | ||
| 3644 | if (!EQ (values_here[p->idx], new_value)) | 3540 | if (!EQ (values_here[p->idx], new_value)) |
| 3645 | break; | 3541 | break; |
| 3646 | } | 3542 | } |
| @@ -8081,7 +7977,7 @@ next_element_from_c_string (struct it *it) | |||
| 8081 | eassert (!it->bidi_p || it->s == it->bidi_it.string.s); | 7977 | eassert (!it->bidi_p || it->s == it->bidi_it.string.s); |
| 8082 | it->what = IT_CHARACTER; | 7978 | it->what = IT_CHARACTER; |
| 8083 | BYTEPOS (it->position) = CHARPOS (it->position) = 0; | 7979 | BYTEPOS (it->position) = CHARPOS (it->position) = 0; |
| 8084 | it->object = Qnil; | 7980 | it->object = make_number (0); |
| 8085 | 7981 | ||
| 8086 | /* With bidi reordering, the character to display might not be the | 7982 | /* With bidi reordering, the character to display might not be the |
| 8087 | character at IT_CHARPOS. BIDI_IT.FIRST_ELT non-zero means that | 7983 | character at IT_CHARPOS. BIDI_IT.FIRST_ELT non-zero means that |
| @@ -13534,7 +13430,7 @@ redisplay_internal (void) | |||
| 13534 | specbind (Qinhibit_free_realized_faces, Qnil); | 13430 | specbind (Qinhibit_free_realized_faces, Qnil); |
| 13535 | 13431 | ||
| 13536 | /* Record this function, so it appears on the profiler's backtraces. */ | 13432 | /* Record this function, so it appears on the profiler's backtraces. */ |
| 13537 | record_in_backtrace (Qredisplay_internal, &Qnil, 0); | 13433 | record_in_backtrace (Qredisplay_internal, 0, 0); |
| 13538 | 13434 | ||
| 13539 | FOR_EACH_FRAME (tail, frame) | 13435 | FOR_EACH_FRAME (tail, frame) |
| 13540 | XFRAME (frame)->already_hscrolled_p = 0; | 13436 | XFRAME (frame)->already_hscrolled_p = 0; |
| @@ -14441,14 +14337,14 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14441 | if (!row->reversed_p) | 14337 | if (!row->reversed_p) |
| 14442 | { | 14338 | { |
| 14443 | while (glyph < end | 14339 | while (glyph < end |
| 14444 | && INTEGERP (glyph->object) | 14340 | && NILP (glyph->object) |
| 14445 | && glyph->charpos < 0) | 14341 | && glyph->charpos < 0) |
| 14446 | { | 14342 | { |
| 14447 | x += glyph->pixel_width; | 14343 | x += glyph->pixel_width; |
| 14448 | ++glyph; | 14344 | ++glyph; |
| 14449 | } | 14345 | } |
| 14450 | while (end > glyph | 14346 | while (end > glyph |
| 14451 | && INTEGERP ((end - 1)->object) | 14347 | && NILP ((end - 1)->object) |
| 14452 | /* CHARPOS is zero for blanks and stretch glyphs | 14348 | /* CHARPOS is zero for blanks and stretch glyphs |
| 14453 | inserted by extend_face_to_end_of_line. */ | 14349 | inserted by extend_face_to_end_of_line. */ |
| 14454 | && (end - 1)->charpos <= 0) | 14350 | && (end - 1)->charpos <= 0) |
| @@ -14466,20 +14362,20 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14466 | glyph += row->used[TEXT_AREA] - 1; | 14362 | glyph += row->used[TEXT_AREA] - 1; |
| 14467 | 14363 | ||
| 14468 | while (glyph > end + 1 | 14364 | while (glyph > end + 1 |
| 14469 | && INTEGERP (glyph->object) | 14365 | && NILP (glyph->object) |
| 14470 | && glyph->charpos < 0) | 14366 | && glyph->charpos < 0) |
| 14471 | { | 14367 | { |
| 14472 | --glyph; | 14368 | --glyph; |
| 14473 | x -= glyph->pixel_width; | 14369 | x -= glyph->pixel_width; |
| 14474 | } | 14370 | } |
| 14475 | if (INTEGERP (glyph->object) && glyph->charpos < 0) | 14371 | if (NILP (glyph->object) && glyph->charpos < 0) |
| 14476 | --glyph; | 14372 | --glyph; |
| 14477 | /* By default, in reversed rows we put the cursor on the | 14373 | /* By default, in reversed rows we put the cursor on the |
| 14478 | rightmost (first in the reading order) glyph. */ | 14374 | rightmost (first in the reading order) glyph. */ |
| 14479 | for (g = end + 1; g < glyph; g++) | 14375 | for (g = end + 1; g < glyph; g++) |
| 14480 | x += g->pixel_width; | 14376 | x += g->pixel_width; |
| 14481 | while (end < glyph | 14377 | while (end < glyph |
| 14482 | && INTEGERP ((end + 1)->object) | 14378 | && NILP ((end + 1)->object) |
| 14483 | && (end + 1)->charpos <= 0) | 14379 | && (end + 1)->charpos <= 0) |
| 14484 | ++end; | 14380 | ++end; |
| 14485 | glyph_before = glyph + 1; | 14381 | glyph_before = glyph + 1; |
| @@ -14510,7 +14406,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14510 | while (/* not marched to end of glyph row */ | 14406 | while (/* not marched to end of glyph row */ |
| 14511 | glyph < end | 14407 | glyph < end |
| 14512 | /* glyph was not inserted by redisplay for internal purposes */ | 14408 | /* glyph was not inserted by redisplay for internal purposes */ |
| 14513 | && !INTEGERP (glyph->object)) | 14409 | && !NILP (glyph->object)) |
| 14514 | { | 14410 | { |
| 14515 | if (BUFFERP (glyph->object)) | 14411 | if (BUFFERP (glyph->object)) |
| 14516 | { | 14412 | { |
| @@ -14598,7 +14494,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14598 | ++glyph; | 14494 | ++glyph; |
| 14599 | } | 14495 | } |
| 14600 | else if (glyph > end) /* row is reversed */ | 14496 | else if (glyph > end) /* row is reversed */ |
| 14601 | while (!INTEGERP (glyph->object)) | 14497 | while (!NILP (glyph->object)) |
| 14602 | { | 14498 | { |
| 14603 | if (BUFFERP (glyph->object)) | 14499 | if (BUFFERP (glyph->object)) |
| 14604 | { | 14500 | { |
| @@ -14675,16 +14571,16 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14675 | && BUFFERP (glyph->object) && glyph->charpos == pt_old) | 14571 | && BUFFERP (glyph->object) && glyph->charpos == pt_old) |
| 14676 | && !(bpos_max <= pt_old && pt_old <= bpos_covered)) | 14572 | && !(bpos_max <= pt_old && pt_old <= bpos_covered)) |
| 14677 | { | 14573 | { |
| 14678 | /* An empty line has a single glyph whose OBJECT is zero and | 14574 | /* An empty line has a single glyph whose OBJECT is nil and |
| 14679 | whose CHARPOS is the position of a newline on that line. | 14575 | whose CHARPOS is the position of a newline on that line. |
| 14680 | Note that on a TTY, there are more glyphs after that, which | 14576 | Note that on a TTY, there are more glyphs after that, which |
| 14681 | were produced by extend_face_to_end_of_line, but their | 14577 | were produced by extend_face_to_end_of_line, but their |
| 14682 | CHARPOS is zero or negative. */ | 14578 | CHARPOS is zero or negative. */ |
| 14683 | int empty_line_p = | 14579 | int empty_line_p = |
| 14684 | (row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) | 14580 | (row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) |
| 14685 | && INTEGERP (glyph->object) && glyph->charpos > 0 | 14581 | && NILP (glyph->object) && glyph->charpos > 0 |
| 14686 | /* On a TTY, continued and truncated rows also have a glyph at | 14582 | /* On a TTY, continued and truncated rows also have a glyph at |
| 14687 | their end whose OBJECT is zero and whose CHARPOS is | 14583 | their end whose OBJECT is nil and whose CHARPOS is |
| 14688 | positive (the continuation and truncation glyphs), but such | 14584 | positive (the continuation and truncation glyphs), but such |
| 14689 | rows are obviously not "empty". */ | 14585 | rows are obviously not "empty". */ |
| 14690 | && !(row->continued_p || row->truncated_on_right_p); | 14586 | && !(row->continued_p || row->truncated_on_right_p); |
| @@ -14961,7 +14857,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14961 | && string_from_text_prop) | 14857 | && string_from_text_prop) |
| 14962 | /* this candidate is from newline and its | 14858 | /* this candidate is from newline and its |
| 14963 | position is not an exact match */ | 14859 | position is not an exact match */ |
| 14964 | || (INTEGERP (glyph->object) | 14860 | || (NILP (glyph->object) |
| 14965 | && glyph->charpos != pt_old))))) | 14861 | && glyph->charpos != pt_old))))) |
| 14966 | return 0; | 14862 | return 0; |
| 14967 | /* If this candidate gives an exact match, use that. */ | 14863 | /* If this candidate gives an exact match, use that. */ |
| @@ -14970,7 +14866,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14970 | terminating newline of a line, and point is on that | 14866 | terminating newline of a line, and point is on that |
| 14971 | newline, it wins because it's an exact match. */ | 14867 | newline, it wins because it's an exact match. */ |
| 14972 | || (!row->continued_p | 14868 | || (!row->continued_p |
| 14973 | && INTEGERP (glyph->object) | 14869 | && NILP (glyph->object) |
| 14974 | && glyph->charpos == 0 | 14870 | && glyph->charpos == 0 |
| 14975 | && pt_old == MATRIX_ROW_END_CHARPOS (row) - 1)) | 14871 | && pt_old == MATRIX_ROW_END_CHARPOS (row) - 1)) |
| 14976 | /* Otherwise, keep the candidate that comes from a row | 14872 | /* Otherwise, keep the candidate that comes from a row |
| @@ -15813,7 +15709,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 15813 | 15709 | ||
| 15814 | exact_match_p = | 15710 | exact_match_p = |
| 15815 | (BUFFERP (g->object) && g->charpos == PT) | 15711 | (BUFFERP (g->object) && g->charpos == PT) |
| 15816 | || (INTEGERP (g->object) | 15712 | || (NILP (g->object) |
| 15817 | && (g->charpos == PT | 15713 | && (g->charpos == PT |
| 15818 | || (g->charpos == 0 && endpos - 1 == PT))); | 15714 | || (g->charpos == 0 && endpos - 1 == PT))); |
| 15819 | } | 15715 | } |
| @@ -18674,7 +18570,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) | |||
| 18674 | ? 'B' | 18570 | ? 'B' |
| 18675 | : (STRINGP (glyph->object) | 18571 | : (STRINGP (glyph->object) |
| 18676 | ? 'S' | 18572 | ? 'S' |
| 18677 | : (INTEGERP (glyph->object) | 18573 | : (NILP (glyph->object) |
| 18678 | ? '0' | 18574 | ? '0' |
| 18679 | : '-'))), | 18575 | : '-'))), |
| 18680 | glyph->pixel_width, | 18576 | glyph->pixel_width, |
| @@ -18697,7 +18593,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) | |||
| 18697 | ? 'B' | 18593 | ? 'B' |
| 18698 | : (STRINGP (glyph->object) | 18594 | : (STRINGP (glyph->object) |
| 18699 | ? 'S' | 18595 | ? 'S' |
| 18700 | : (INTEGERP (glyph->object) | 18596 | : (NILP (glyph->object) |
| 18701 | ? '0' | 18597 | ? '0' |
| 18702 | : '-'))), | 18598 | : '-'))), |
| 18703 | glyph->pixel_width, | 18599 | glyph->pixel_width, |
| @@ -18718,7 +18614,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) | |||
| 18718 | ? 'B' | 18614 | ? 'B' |
| 18719 | : (STRINGP (glyph->object) | 18615 | : (STRINGP (glyph->object) |
| 18720 | ? 'S' | 18616 | ? 'S' |
| 18721 | : (INTEGERP (glyph->object) | 18617 | : (NILP (glyph->object) |
| 18722 | ? '0' | 18618 | ? '0' |
| 18723 | : '-'))), | 18619 | : '-'))), |
| 18724 | glyph->pixel_width, | 18620 | glyph->pixel_width, |
| @@ -18739,7 +18635,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area) | |||
| 18739 | ? 'B' | 18635 | ? 'B' |
| 18740 | : (STRINGP (glyph->object) | 18636 | : (STRINGP (glyph->object) |
| 18741 | ? 'S' | 18637 | ? 'S' |
| 18742 | : (INTEGERP (glyph->object) | 18638 | : (NILP (glyph->object) |
| 18743 | ? '0' | 18639 | ? '0' |
| 18744 | : '-'))), | 18640 | : '-'))), |
| 18745 | glyph->pixel_width, | 18641 | glyph->pixel_width, |
| @@ -18862,7 +18758,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs) | |||
| 18862 | struct glyph *glyph = row->glyphs[area] + i; | 18758 | struct glyph *glyph = row->glyphs[area] + i; |
| 18863 | if (i == row->used[area] - 1 | 18759 | if (i == row->used[area] - 1 |
| 18864 | && area == TEXT_AREA | 18760 | && area == TEXT_AREA |
| 18865 | && INTEGERP (glyph->object) | 18761 | && NILP (glyph->object) |
| 18866 | && glyph->type == CHAR_GLYPH | 18762 | && glyph->type == CHAR_GLYPH |
| 18867 | && glyph->u.ch == ' ') | 18763 | && glyph->u.ch == ' ') |
| 18868 | { | 18764 | { |
| @@ -19092,7 +18988,7 @@ insert_left_trunc_glyphs (struct it *it) | |||
| 19092 | truncate_it.area = TEXT_AREA; | 18988 | truncate_it.area = TEXT_AREA; |
| 19093 | truncate_it.glyph_row->used[TEXT_AREA] = 0; | 18989 | truncate_it.glyph_row->used[TEXT_AREA] = 0; |
| 19094 | CHARPOS (truncate_it.position) = BYTEPOS (truncate_it.position) = -1; | 18990 | CHARPOS (truncate_it.position) = BYTEPOS (truncate_it.position) = -1; |
| 19095 | truncate_it.object = make_number (0); | 18991 | truncate_it.object = Qnil; |
| 19096 | produce_special_glyphs (&truncate_it, IT_TRUNCATION); | 18992 | produce_special_glyphs (&truncate_it, IT_TRUNCATION); |
| 19097 | 18993 | ||
| 19098 | /* Overwrite glyphs from IT with truncation glyphs. */ | 18994 | /* Overwrite glyphs from IT with truncation glyphs. */ |
| @@ -19375,7 +19271,7 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 19375 | 19271 | ||
| 19376 | it->what = IT_CHARACTER; | 19272 | it->what = IT_CHARACTER; |
| 19377 | memset (&it->position, 0, sizeof it->position); | 19273 | memset (&it->position, 0, sizeof it->position); |
| 19378 | it->object = make_number (0); | 19274 | it->object = Qnil; |
| 19379 | it->c = it->char_to_display = ' '; | 19275 | it->c = it->char_to_display = ' '; |
| 19380 | it->len = 1; | 19276 | it->len = 1; |
| 19381 | 19277 | ||
| @@ -19567,7 +19463,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 19567 | else | 19463 | else |
| 19568 | it->face_id = face->id; | 19464 | it->face_id = face->id; |
| 19569 | it->start_of_box_run_p = 0; | 19465 | it->start_of_box_run_p = 0; |
| 19570 | append_stretch_glyph (it, make_number (0), stretch_width, | 19466 | append_stretch_glyph (it, Qnil, stretch_width, |
| 19571 | it->ascent + it->descent, stretch_ascent); | 19467 | it->ascent + it->descent, stretch_ascent); |
| 19572 | it->position = saved_pos; | 19468 | it->position = saved_pos; |
| 19573 | it->avoid_cursor_p = saved_avoid_cursor; | 19469 | it->avoid_cursor_p = saved_avoid_cursor; |
| @@ -19597,7 +19493,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 19597 | 19493 | ||
| 19598 | it->what = IT_CHARACTER; | 19494 | it->what = IT_CHARACTER; |
| 19599 | memset (&it->position, 0, sizeof it->position); | 19495 | memset (&it->position, 0, sizeof it->position); |
| 19600 | it->object = make_number (0); | 19496 | it->object = Qnil; |
| 19601 | it->c = it->char_to_display = ' '; | 19497 | it->c = it->char_to_display = ' '; |
| 19602 | it->len = 1; | 19498 | it->len = 1; |
| 19603 | 19499 | ||
| @@ -19726,14 +19622,14 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | |||
| 19726 | { | 19622 | { |
| 19727 | while (glyph >= start | 19623 | while (glyph >= start |
| 19728 | && glyph->type == CHAR_GLYPH | 19624 | && glyph->type == CHAR_GLYPH |
| 19729 | && INTEGERP (glyph->object)) | 19625 | && NILP (glyph->object)) |
| 19730 | --glyph; | 19626 | --glyph; |
| 19731 | } | 19627 | } |
| 19732 | else | 19628 | else |
| 19733 | { | 19629 | { |
| 19734 | while (glyph <= start | 19630 | while (glyph <= start |
| 19735 | && glyph->type == CHAR_GLYPH | 19631 | && glyph->type == CHAR_GLYPH |
| 19736 | && INTEGERP (glyph->object)) | 19632 | && NILP (glyph->object)) |
| 19737 | ++glyph; | 19633 | ++glyph; |
| 19738 | } | 19634 | } |
| 19739 | 19635 | ||
| @@ -20096,10 +19992,9 @@ find_row_edges (struct it *it, struct glyph_row *row, | |||
| 20096 | { | 19992 | { |
| 20097 | start = r1->glyphs[TEXT_AREA]; | 19993 | start = r1->glyphs[TEXT_AREA]; |
| 20098 | end = start + r1->used[TEXT_AREA]; | 19994 | end = start + r1->used[TEXT_AREA]; |
| 20099 | /* Glyphs inserted by redisplay have an integer (zero) | 19995 | /* Glyphs inserted by redisplay have nil as their object. */ |
| 20100 | as their object. */ | ||
| 20101 | while (end > start | 19996 | while (end > start |
| 20102 | && INTEGERP ((end - 1)->object) | 19997 | && NILP ((end - 1)->object) |
| 20103 | && (end - 1)->charpos <= 0) | 19998 | && (end - 1)->charpos <= 0) |
| 20104 | --end; | 19999 | --end; |
| 20105 | if (end > start) | 20000 | if (end > start) |
| @@ -20120,7 +20015,7 @@ find_row_edges (struct it *it, struct glyph_row *row, | |||
| 20120 | end = r1->glyphs[TEXT_AREA] - 1; | 20015 | end = r1->glyphs[TEXT_AREA] - 1; |
| 20121 | start = end + r1->used[TEXT_AREA]; | 20016 | start = end + r1->used[TEXT_AREA]; |
| 20122 | while (end < start | 20017 | while (end < start |
| 20123 | && INTEGERP ((end + 1)->object) | 20018 | && NILP ((end + 1)->object) |
| 20124 | && (end + 1)->charpos <= 0) | 20019 | && (end + 1)->charpos <= 0) |
| 20125 | ++end; | 20020 | ++end; |
| 20126 | if (end < start) | 20021 | if (end < start) |
| @@ -21273,7 +21168,7 @@ Value is the new character position of point. */) | |||
| 21273 | 21168 | ||
| 21274 | #define ROW_GLYPH_NEWLINE_P(ROW,GLYPH) \ | 21169 | #define ROW_GLYPH_NEWLINE_P(ROW,GLYPH) \ |
| 21275 | (!(ROW)->continued_p \ | 21170 | (!(ROW)->continued_p \ |
| 21276 | && INTEGERP ((GLYPH)->object) \ | 21171 | && NILP ((GLYPH)->object) \ |
| 21277 | && (GLYPH)->type == CHAR_GLYPH \ | 21172 | && (GLYPH)->type == CHAR_GLYPH \ |
| 21278 | && (GLYPH)->u.ch == ' ' \ | 21173 | && (GLYPH)->u.ch == ' ' \ |
| 21279 | && (GLYPH)->charpos >= 0 \ | 21174 | && (GLYPH)->charpos >= 0 \ |
| @@ -21315,7 +21210,7 @@ Value is the new character position of point. */) | |||
| 21315 | w->cursor.vpos = -1; | 21210 | w->cursor.vpos = -1; |
| 21316 | return make_number (PT); | 21211 | return make_number (PT); |
| 21317 | } | 21212 | } |
| 21318 | else if (!INTEGERP (g->object) && !EQ (g->object, gpt->object)) | 21213 | else if (!NILP (g->object) && !EQ (g->object, gpt->object)) |
| 21319 | { | 21214 | { |
| 21320 | ptrdiff_t new_pos; | 21215 | ptrdiff_t new_pos; |
| 21321 | 21216 | ||
| @@ -21352,7 +21247,7 @@ Value is the new character position of point. */) | |||
| 21352 | return make_number (PT); | 21247 | return make_number (PT); |
| 21353 | } | 21248 | } |
| 21354 | } | 21249 | } |
| 21355 | if (g == e || INTEGERP (g->object)) | 21250 | if (g == e || NILP (g->object)) |
| 21356 | { | 21251 | { |
| 21357 | if (row->truncated_on_left_p || row->truncated_on_right_p) | 21252 | if (row->truncated_on_left_p || row->truncated_on_right_p) |
| 21358 | goto simulate_display; | 21253 | goto simulate_display; |
| @@ -21385,7 +21280,7 @@ Value is the new character position of point. */) | |||
| 21385 | EOB also has one glyph, but its charpos is -1. */ | 21280 | EOB also has one glyph, but its charpos is -1. */ |
| 21386 | || (row->ends_at_zv_p | 21281 | || (row->ends_at_zv_p |
| 21387 | && !row->reversed_p | 21282 | && !row->reversed_p |
| 21388 | && INTEGERP (g->object) | 21283 | && NILP (g->object) |
| 21389 | && g->type == CHAR_GLYPH | 21284 | && g->type == CHAR_GLYPH |
| 21390 | && g->u.ch == ' ')) | 21285 | && g->u.ch == ' ')) |
| 21391 | { | 21286 | { |
| @@ -21423,7 +21318,7 @@ Value is the new character position of point. */) | |||
| 21423 | || g->type == STRETCH_GLYPH | 21318 | || g->type == STRETCH_GLYPH |
| 21424 | || (row->ends_at_zv_p | 21319 | || (row->ends_at_zv_p |
| 21425 | && row->reversed_p | 21320 | && row->reversed_p |
| 21426 | && INTEGERP (g->object) | 21321 | && NILP (g->object) |
| 21427 | && g->type == CHAR_GLYPH | 21322 | && g->type == CHAR_GLYPH |
| 21428 | && g->u.ch == ' ')) | 21323 | && g->u.ch == ' ')) |
| 21429 | { | 21324 | { |
| @@ -21787,13 +21682,13 @@ Emacs UBA implementation, in particular with the test suite. */) | |||
| 21787 | /* Skip over glyphs at the start of the row that was | 21682 | /* Skip over glyphs at the start of the row that was |
| 21788 | generated by redisplay for its own needs. */ | 21683 | generated by redisplay for its own needs. */ |
| 21789 | while (g < e | 21684 | while (g < e |
| 21790 | && INTEGERP (g->object) | 21685 | && NILP (g->object) |
| 21791 | && g->charpos < 0) | 21686 | && g->charpos < 0) |
| 21792 | g++; | 21687 | g++; |
| 21793 | g1 = g; | 21688 | g1 = g; |
| 21794 | 21689 | ||
| 21795 | /* Count the "interesting" glyphs in this row. */ | 21690 | /* Count the "interesting" glyphs in this row. */ |
| 21796 | for (nglyphs = 0; g < e && !INTEGERP (g->object); g++) | 21691 | for (nglyphs = 0; g < e && !NILP (g->object); g++) |
| 21797 | nglyphs++; | 21692 | nglyphs++; |
| 21798 | 21693 | ||
| 21799 | /* Create and fill the array. */ | 21694 | /* Create and fill the array. */ |
| @@ -21806,11 +21701,11 @@ Emacs UBA implementation, in particular with the test suite. */) | |||
| 21806 | g = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1; | 21701 | g = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1; |
| 21807 | e = row->glyphs[TEXT_AREA] - 1; | 21702 | e = row->glyphs[TEXT_AREA] - 1; |
| 21808 | while (g > e | 21703 | while (g > e |
| 21809 | && INTEGERP (g->object) | 21704 | && NILP (g->object) |
| 21810 | && g->charpos < 0) | 21705 | && g->charpos < 0) |
| 21811 | g--; | 21706 | g--; |
| 21812 | g1 = g; | 21707 | g1 = g; |
| 21813 | for (nglyphs = 0; g > e && !INTEGERP (g->object); g--) | 21708 | for (nglyphs = 0; g > e && !NILP (g->object); g--) |
| 21814 | nglyphs++; | 21709 | nglyphs++; |
| 21815 | levels = make_uninit_vector (nglyphs); | 21710 | levels = make_uninit_vector (nglyphs); |
| 21816 | for (i = 0; g1 > g; i++, g1--) | 21711 | for (i = 0; g1 > g; i++, g1--) |
| @@ -26273,7 +26168,7 @@ produce_special_glyphs (struct it *it, enum display_element_type what) | |||
| 26273 | GLYPH glyph; | 26168 | GLYPH glyph; |
| 26274 | 26169 | ||
| 26275 | temp_it = *it; | 26170 | temp_it = *it; |
| 26276 | temp_it.object = make_number (0); | 26171 | temp_it.object = Qnil; |
| 26277 | memset (&temp_it.current, 0, sizeof temp_it.current); | 26172 | memset (&temp_it.current, 0, sizeof temp_it.current); |
| 26278 | 26173 | ||
| 26279 | if (what == IT_CONTINUATION) | 26174 | if (what == IT_CONTINUATION) |
| @@ -26336,7 +26231,7 @@ produce_special_glyphs (struct it *it, enum display_element_type what) | |||
| 26336 | (((temp_it.ascent + temp_it.descent) | 26231 | (((temp_it.ascent + temp_it.descent) |
| 26337 | * FONT_BASE (font)) / FONT_HEIGHT (font)); | 26232 | * FONT_BASE (font)) / FONT_HEIGHT (font)); |
| 26338 | 26233 | ||
| 26339 | append_stretch_glyph (&temp_it, make_number (0), stretch_width, | 26234 | append_stretch_glyph (&temp_it, Qnil, stretch_width, |
| 26340 | temp_it.ascent + temp_it.descent, | 26235 | temp_it.ascent + temp_it.descent, |
| 26341 | stretch_ascent); | 26236 | stretch_ascent); |
| 26342 | } | 26237 | } |
| @@ -28522,7 +28417,7 @@ rows_from_pos_range (struct window *w, | |||
| 28522 | 28417 | ||
| 28523 | while (g < e) | 28418 | while (g < e) |
| 28524 | { | 28419 | { |
| 28525 | if (((BUFFERP (g->object) || INTEGERP (g->object)) | 28420 | if (((BUFFERP (g->object) || NILP (g->object)) |
| 28526 | && start_charpos <= g->charpos && g->charpos < end_charpos) | 28421 | && start_charpos <= g->charpos && g->charpos < end_charpos) |
| 28527 | /* A glyph that comes from DISP_STRING is by | 28422 | /* A glyph that comes from DISP_STRING is by |
| 28528 | definition to be highlighted. */ | 28423 | definition to be highlighted. */ |
| @@ -28577,7 +28472,7 @@ rows_from_pos_range (struct window *w, | |||
| 28577 | 28472 | ||
| 28578 | while (g < e) | 28473 | while (g < e) |
| 28579 | { | 28474 | { |
| 28580 | if (((BUFFERP (g->object) || INTEGERP (g->object)) | 28475 | if (((BUFFERP (g->object) || NILP (g->object)) |
| 28581 | && ((start_charpos <= g->charpos && g->charpos < end_charpos) | 28476 | && ((start_charpos <= g->charpos && g->charpos < end_charpos) |
| 28582 | /* If the buffer position of the first glyph in | 28477 | /* If the buffer position of the first glyph in |
| 28583 | the row is equal to END_CHARPOS, it means | 28478 | the row is equal to END_CHARPOS, it means |
| @@ -28659,7 +28554,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28659 | { | 28554 | { |
| 28660 | struct glyph *beg = prev->glyphs[TEXT_AREA]; | 28555 | struct glyph *beg = prev->glyphs[TEXT_AREA]; |
| 28661 | glyph = beg + prev->used[TEXT_AREA]; | 28556 | glyph = beg + prev->used[TEXT_AREA]; |
| 28662 | while (--glyph >= beg && INTEGERP (glyph->object)); | 28557 | while (--glyph >= beg && NILP (glyph->object)); |
| 28663 | if (glyph < beg | 28558 | if (glyph < beg |
| 28664 | || !(EQ (glyph->object, before_string) | 28559 | || !(EQ (glyph->object, before_string) |
| 28665 | || EQ (glyph->object, disp_string))) | 28560 | || EQ (glyph->object, disp_string))) |
| @@ -28723,7 +28618,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28723 | /* Skip truncation glyphs at the start of the glyph row. */ | 28618 | /* Skip truncation glyphs at the start of the glyph row. */ |
| 28724 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) | 28619 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) |
| 28725 | for (; glyph < end | 28620 | for (; glyph < end |
| 28726 | && INTEGERP (glyph->object) | 28621 | && NILP (glyph->object) |
| 28727 | && glyph->charpos < 0; | 28622 | && glyph->charpos < 0; |
| 28728 | ++glyph) | 28623 | ++glyph) |
| 28729 | x += glyph->pixel_width; | 28624 | x += glyph->pixel_width; |
| @@ -28732,7 +28627,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28732 | or DISP_STRING, and the first glyph from buffer whose | 28627 | or DISP_STRING, and the first glyph from buffer whose |
| 28733 | position is between START_CHARPOS and END_CHARPOS. */ | 28628 | position is between START_CHARPOS and END_CHARPOS. */ |
| 28734 | for (; glyph < end | 28629 | for (; glyph < end |
| 28735 | && !INTEGERP (glyph->object) | 28630 | && !NILP (glyph->object) |
| 28736 | && !EQ (glyph->object, disp_string) | 28631 | && !EQ (glyph->object, disp_string) |
| 28737 | && !(BUFFERP (glyph->object) | 28632 | && !(BUFFERP (glyph->object) |
| 28738 | && (glyph->charpos >= start_charpos | 28633 | && (glyph->charpos >= start_charpos |
| @@ -28774,7 +28669,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28774 | /* Skip truncation glyphs at the start of the glyph row. */ | 28669 | /* Skip truncation glyphs at the start of the glyph row. */ |
| 28775 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) | 28670 | if (MATRIX_ROW_DISPLAYS_TEXT_P (r1)) |
| 28776 | for (; glyph > end | 28671 | for (; glyph > end |
| 28777 | && INTEGERP (glyph->object) | 28672 | && NILP (glyph->object) |
| 28778 | && glyph->charpos < 0; | 28673 | && glyph->charpos < 0; |
| 28779 | --glyph) | 28674 | --glyph) |
| 28780 | ; | 28675 | ; |
| @@ -28783,7 +28678,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28783 | or DISP_STRING, and the first glyph from buffer whose | 28678 | or DISP_STRING, and the first glyph from buffer whose |
| 28784 | position is between START_CHARPOS and END_CHARPOS. */ | 28679 | position is between START_CHARPOS and END_CHARPOS. */ |
| 28785 | for (; glyph > end | 28680 | for (; glyph > end |
| 28786 | && !INTEGERP (glyph->object) | 28681 | && !NILP (glyph->object) |
| 28787 | && !EQ (glyph->object, disp_string) | 28682 | && !EQ (glyph->object, disp_string) |
| 28788 | && !(BUFFERP (glyph->object) | 28683 | && !(BUFFERP (glyph->object) |
| 28789 | && (glyph->charpos >= start_charpos | 28684 | && (glyph->charpos >= start_charpos |
| @@ -28840,7 +28735,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28840 | row, and also blanks and stretch glyphs inserted by | 28735 | row, and also blanks and stretch glyphs inserted by |
| 28841 | extend_face_to_end_of_line. */ | 28736 | extend_face_to_end_of_line. */ |
| 28842 | while (end > glyph | 28737 | while (end > glyph |
| 28843 | && INTEGERP ((end - 1)->object)) | 28738 | && NILP ((end - 1)->object)) |
| 28844 | --end; | 28739 | --end; |
| 28845 | /* Scan the rest of the glyph row from the end, looking for the | 28740 | /* Scan the rest of the glyph row from the end, looking for the |
| 28846 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or | 28741 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or |
| @@ -28848,7 +28743,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28848 | and END_CHARPOS */ | 28743 | and END_CHARPOS */ |
| 28849 | for (--end; | 28744 | for (--end; |
| 28850 | end > glyph | 28745 | end > glyph |
| 28851 | && !INTEGERP (end->object) | 28746 | && !NILP (end->object) |
| 28852 | && !EQ (end->object, disp_string) | 28747 | && !EQ (end->object, disp_string) |
| 28853 | && !(BUFFERP (end->object) | 28748 | && !(BUFFERP (end->object) |
| 28854 | && (end->charpos >= start_charpos | 28749 | && (end->charpos >= start_charpos |
| @@ -28886,7 +28781,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28886 | x = r2->x; | 28781 | x = r2->x; |
| 28887 | end++; | 28782 | end++; |
| 28888 | while (end < glyph | 28783 | while (end < glyph |
| 28889 | && INTEGERP (end->object)) | 28784 | && NILP (end->object)) |
| 28890 | { | 28785 | { |
| 28891 | x += end->pixel_width; | 28786 | x += end->pixel_width; |
| 28892 | ++end; | 28787 | ++end; |
| @@ -28897,7 +28792,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 28897 | and END_CHARPOS */ | 28792 | and END_CHARPOS */ |
| 28898 | for ( ; | 28793 | for ( ; |
| 28899 | end < glyph | 28794 | end < glyph |
| 28900 | && !INTEGERP (end->object) | 28795 | && !NILP (end->object) |
| 28901 | && !EQ (end->object, disp_string) | 28796 | && !EQ (end->object, disp_string) |
| 28902 | && !(BUFFERP (end->object) | 28797 | && !(BUFFERP (end->object) |
| 28903 | && (end->charpos >= start_charpos | 28798 | && (end->charpos >= start_charpos |
| @@ -29829,12 +29724,12 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 29829 | if (glyph == NULL | 29724 | if (glyph == NULL |
| 29830 | || area != TEXT_AREA | 29725 | || area != TEXT_AREA |
| 29831 | || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, vpos)) | 29726 | || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, vpos)) |
| 29832 | /* Glyph's OBJECT is an integer for glyphs inserted by the | 29727 | /* Glyph's OBJECT is nil for glyphs inserted by the |
| 29833 | display engine for its internal purposes, like truncation | 29728 | display engine for its internal purposes, like truncation |
| 29834 | and continuation glyphs and blanks beyond the end of | 29729 | and continuation glyphs and blanks beyond the end of |
| 29835 | line's text on text terminals. If we are over such a | 29730 | line's text on text terminals. If we are over such a |
| 29836 | glyph, we are not over any text. */ | 29731 | glyph, we are not over any text. */ |
| 29837 | || INTEGERP (glyph->object) | 29732 | || NILP (glyph->object) |
| 29838 | /* R2L rows have a stretch glyph at their front, which | 29733 | /* R2L rows have a stretch glyph at their front, which |
| 29839 | stands for no text, whereas L2R rows have no glyphs at | 29734 | stands for no text, whereas L2R rows have no glyphs at |
| 29840 | all beyond the end of text. Treat such stretch glyphs | 29735 | all beyond the end of text. Treat such stretch glyphs |
| @@ -30806,7 +30701,9 @@ syms_of_xdisp (void) | |||
| 30806 | Vmessage_stack = Qnil; | 30701 | Vmessage_stack = Qnil; |
| 30807 | staticpro (&Vmessage_stack); | 30702 | staticpro (&Vmessage_stack); |
| 30808 | 30703 | ||
| 30704 | /* Non-nil means don't actually do any redisplay. */ | ||
| 30809 | DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); | 30705 | DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); |
| 30706 | |||
| 30810 | DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); | 30707 | DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); |
| 30811 | 30708 | ||
| 30812 | message_dolog_marker1 = Fmake_marker (); | 30709 | message_dolog_marker1 = Fmake_marker (); |
| @@ -30845,6 +30742,8 @@ syms_of_xdisp (void) | |||
| 30845 | DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); | 30742 | DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); |
| 30846 | DEFSYM (Qeval, "eval"); | 30743 | DEFSYM (Qeval, "eval"); |
| 30847 | DEFSYM (QCdata, ":data"); | 30744 | DEFSYM (QCdata, ":data"); |
| 30745 | |||
| 30746 | /* Names of text properties relevant for redisplay. */ | ||
| 30848 | DEFSYM (Qdisplay, "display"); | 30747 | DEFSYM (Qdisplay, "display"); |
| 30849 | DEFSYM (Qspace_width, "space-width"); | 30748 | DEFSYM (Qspace_width, "space-width"); |
| 30850 | DEFSYM (Qraise, "raise"); | 30749 | DEFSYM (Qraise, "raise"); |
| @@ -30864,40 +30763,69 @@ syms_of_xdisp (void) | |||
| 30864 | DEFSYM (QCfile, ":file"); | 30763 | DEFSYM (QCfile, ":file"); |
| 30865 | DEFSYM (Qfontified, "fontified"); | 30764 | DEFSYM (Qfontified, "fontified"); |
| 30866 | DEFSYM (Qfontification_functions, "fontification-functions"); | 30765 | DEFSYM (Qfontification_functions, "fontification-functions"); |
| 30766 | |||
| 30767 | /* Name of the face used to highlight trailing whitespace. */ | ||
| 30867 | DEFSYM (Qtrailing_whitespace, "trailing-whitespace"); | 30768 | DEFSYM (Qtrailing_whitespace, "trailing-whitespace"); |
| 30769 | |||
| 30770 | /* Name and number of the face used to highlight escape glyphs. */ | ||
| 30868 | DEFSYM (Qescape_glyph, "escape-glyph"); | 30771 | DEFSYM (Qescape_glyph, "escape-glyph"); |
| 30772 | |||
| 30773 | /* Name and number of the face used to highlight non-breaking spaces. */ | ||
| 30869 | DEFSYM (Qnobreak_space, "nobreak-space"); | 30774 | DEFSYM (Qnobreak_space, "nobreak-space"); |
| 30775 | |||
| 30776 | /* The symbol 'image' which is the car of the lists used to represent | ||
| 30777 | images in Lisp. Also a tool bar style. */ | ||
| 30870 | DEFSYM (Qimage, "image"); | 30778 | DEFSYM (Qimage, "image"); |
| 30779 | |||
| 30780 | /* Tool bar styles. */ | ||
| 30871 | DEFSYM (Qtext, "text"); | 30781 | DEFSYM (Qtext, "text"); |
| 30872 | DEFSYM (Qboth, "both"); | 30782 | DEFSYM (Qboth, "both"); |
| 30873 | DEFSYM (Qboth_horiz, "both-horiz"); | 30783 | DEFSYM (Qboth_horiz, "both-horiz"); |
| 30874 | DEFSYM (Qtext_image_horiz, "text-image-horiz"); | 30784 | DEFSYM (Qtext_image_horiz, "text-image-horiz"); |
| 30785 | |||
| 30786 | /* The image map types. */ | ||
| 30875 | DEFSYM (QCmap, ":map"); | 30787 | DEFSYM (QCmap, ":map"); |
| 30876 | DEFSYM (QCpointer, ":pointer"); | 30788 | DEFSYM (QCpointer, ":pointer"); |
| 30877 | DEFSYM (Qrect, "rect"); | 30789 | DEFSYM (Qrect, "rect"); |
| 30878 | DEFSYM (Qcircle, "circle"); | 30790 | DEFSYM (Qcircle, "circle"); |
| 30879 | DEFSYM (Qpoly, "poly"); | 30791 | DEFSYM (Qpoly, "poly"); |
| 30792 | |||
| 30793 | /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ | ||
| 30794 | DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update"); | ||
| 30880 | DEFSYM (Qmessage_truncate_lines, "message-truncate-lines"); | 30795 | DEFSYM (Qmessage_truncate_lines, "message-truncate-lines"); |
| 30796 | |||
| 30881 | DEFSYM (Qgrow_only, "grow-only"); | 30797 | DEFSYM (Qgrow_only, "grow-only"); |
| 30882 | DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update"); | ||
| 30883 | DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay"); | 30798 | DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay"); |
| 30884 | DEFSYM (Qposition, "position"); | 30799 | DEFSYM (Qposition, "position"); |
| 30885 | DEFSYM (Qbuffer_position, "buffer-position"); | 30800 | DEFSYM (Qbuffer_position, "buffer-position"); |
| 30886 | DEFSYM (Qobject, "object"); | 30801 | DEFSYM (Qobject, "object"); |
| 30802 | |||
| 30803 | /* Cursor shapes. */ | ||
| 30887 | DEFSYM (Qbar, "bar"); | 30804 | DEFSYM (Qbar, "bar"); |
| 30888 | DEFSYM (Qhbar, "hbar"); | 30805 | DEFSYM (Qhbar, "hbar"); |
| 30889 | DEFSYM (Qbox, "box"); | 30806 | DEFSYM (Qbox, "box"); |
| 30890 | DEFSYM (Qhollow, "hollow"); | 30807 | DEFSYM (Qhollow, "hollow"); |
| 30808 | |||
| 30809 | /* Pointer shapes. */ | ||
| 30891 | DEFSYM (Qhand, "hand"); | 30810 | DEFSYM (Qhand, "hand"); |
| 30892 | DEFSYM (Qarrow, "arrow"); | 30811 | DEFSYM (Qarrow, "arrow"); |
| 30812 | /* also Qtext */ | ||
| 30813 | |||
| 30893 | DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); | 30814 | DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); |
| 30894 | 30815 | ||
| 30895 | list_of_error = list1 (list2 (intern_c_string ("error"), | 30816 | list_of_error = list1 (list2 (intern_c_string ("error"), |
| 30896 | intern_c_string ("void-variable"))); | 30817 | intern_c_string ("void-variable"))); |
| 30897 | staticpro (&list_of_error); | 30818 | staticpro (&list_of_error); |
| 30898 | 30819 | ||
| 30820 | /* Values of those variables at last redisplay are stored as | ||
| 30821 | properties on 'overlay-arrow-position' symbol. However, if | ||
| 30822 | Voverlay_arrow_position is a marker, last-arrow-position is its | ||
| 30823 | numerical position. */ | ||
| 30899 | DEFSYM (Qlast_arrow_position, "last-arrow-position"); | 30824 | DEFSYM (Qlast_arrow_position, "last-arrow-position"); |
| 30900 | DEFSYM (Qlast_arrow_string, "last-arrow-string"); | 30825 | DEFSYM (Qlast_arrow_string, "last-arrow-string"); |
| 30826 | |||
| 30827 | /* Alternative overlay-arrow-string and overlay-arrow-bitmap | ||
| 30828 | properties on a symbol in overlay-arrow-variable-list. */ | ||
| 30901 | DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string"); | 30829 | DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string"); |
| 30902 | DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap"); | 30830 | DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap"); |
| 30903 | 30831 | ||
| @@ -31397,7 +31325,10 @@ cursor shapes. */); | |||
| 31397 | hourglass_shown_p = 0; | 31325 | hourglass_shown_p = 0; |
| 31398 | #endif /* HAVE_WINDOW_SYSTEM */ | 31326 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 31399 | 31327 | ||
| 31328 | /* Name of the face used to display glyphless characters. */ | ||
| 31400 | DEFSYM (Qglyphless_char, "glyphless-char"); | 31329 | DEFSYM (Qglyphless_char, "glyphless-char"); |
| 31330 | |||
| 31331 | /* Method symbols for Vglyphless_char_display. */ | ||
| 31401 | DEFSYM (Qhex_code, "hex-code"); | 31332 | DEFSYM (Qhex_code, "hex-code"); |
| 31402 | DEFSYM (Qempty_box, "empty-box"); | 31333 | DEFSYM (Qempty_box, "empty-box"); |
| 31403 | DEFSYM (Qthin_space, "thin-space"); | 31334 | DEFSYM (Qthin_space, "thin-space"); |
| @@ -31410,6 +31341,7 @@ be redisplayed. This set can be nil (meaning, only the selected window), | |||
| 31410 | or t (meaning all windows). */); | 31341 | or t (meaning all windows). */); |
| 31411 | Vpre_redisplay_function = intern ("ignore"); | 31342 | Vpre_redisplay_function = intern ("ignore"); |
| 31412 | 31343 | ||
| 31344 | /* Symbol for the purpose of Vglyphless_char_display. */ | ||
| 31413 | DEFSYM (Qglyphless_char_display, "glyphless-char-display"); | 31345 | DEFSYM (Qglyphless_char_display, "glyphless-char-display"); |
| 31414 | Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); | 31346 | Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); |
| 31415 | 31347 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index 0600f53ba1e..6ecd857d685 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -278,57 +278,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 278 | 278 | ||
| 279 | #define FACE_CACHE_BUCKETS_SIZE 1001 | 279 | #define FACE_CACHE_BUCKETS_SIZE 1001 |
| 280 | 280 | ||
| 281 | /* Keyword symbols used for face attribute names. */ | ||
| 282 | |||
| 283 | Lisp_Object QCfamily, QCheight, QCweight, QCslant; | ||
| 284 | static Lisp_Object QCunderline; | ||
| 285 | static Lisp_Object QCinverse_video, QCstipple; | ||
| 286 | Lisp_Object QCforeground, QCbackground; | ||
| 287 | Lisp_Object QCwidth; | ||
| 288 | static Lisp_Object QCfont, QCbold, QCitalic; | ||
| 289 | static Lisp_Object QCreverse_video; | ||
| 290 | static Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit; | ||
| 291 | static Lisp_Object QCfontset, QCdistant_foreground; | ||
| 292 | |||
| 293 | /* Symbols used for attribute values. */ | ||
| 294 | |||
| 295 | Lisp_Object Qnormal; | ||
| 296 | Lisp_Object Qbold; | ||
| 297 | static Lisp_Object Qline, Qwave; | ||
| 298 | Lisp_Object Qextra_light, Qlight; | ||
| 299 | Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; | ||
| 300 | Lisp_Object Qoblique; | ||
| 301 | Lisp_Object Qitalic; | ||
| 302 | static Lisp_Object Qreleased_button, Qpressed_button; | ||
| 303 | static Lisp_Object QCstyle, QCcolor, QCline_width; | ||
| 304 | Lisp_Object Qunspecified; /* used in dosfns.c */ | ||
| 305 | static Lisp_Object QCignore_defface; | ||
| 306 | |||
| 307 | char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; | 281 | char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; |
| 308 | 282 | ||
| 309 | /* The name of the function to call when the background of the frame | ||
| 310 | has changed, frame_set_background_mode. */ | ||
| 311 | |||
| 312 | static Lisp_Object Qframe_set_background_mode; | ||
| 313 | |||
| 314 | /* Names of basic faces. */ | ||
| 315 | |||
| 316 | Lisp_Object Qdefault, Qtool_bar, Qfringe; | ||
| 317 | static Lisp_Object Qregion; | ||
| 318 | Lisp_Object Qheader_line, Qscroll_bar, Qcursor; | ||
| 319 | static Lisp_Object Qborder, Qmouse, Qmenu; | ||
| 320 | Lisp_Object Qmode_line_inactive; | ||
| 321 | static Lisp_Object Qvertical_border; | ||
| 322 | static Lisp_Object Qwindow_divider; | ||
| 323 | static Lisp_Object Qwindow_divider_first_pixel; | ||
| 324 | static Lisp_Object Qwindow_divider_last_pixel; | ||
| 325 | |||
| 326 | /* The symbol `face-alias'. A symbols having that property is an | ||
| 327 | alias for another face. Value of the property is the name of | ||
| 328 | the aliased face. */ | ||
| 329 | |||
| 330 | static Lisp_Object Qface_alias; | ||
| 331 | |||
| 332 | /* Alist of alternative font families. Each element is of the form | 283 | /* Alist of alternative font families. Each element is of the form |
| 333 | (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded, | 284 | (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded, |
| 334 | try FAMILY1, then FAMILY2, ... */ | 285 | try FAMILY1, then FAMILY2, ... */ |
| @@ -341,32 +292,6 @@ Lisp_Object Vface_alternative_font_family_alist; | |||
| 341 | 292 | ||
| 342 | Lisp_Object Vface_alternative_font_registry_alist; | 293 | Lisp_Object Vface_alternative_font_registry_alist; |
| 343 | 294 | ||
| 344 | /* Allowed scalable fonts. A value of nil means don't allow any | ||
| 345 | scalable fonts. A value of t means allow the use of any scalable | ||
| 346 | font. Otherwise, value must be a list of regular expressions. A | ||
| 347 | font may be scaled if its name matches a regular expression in the | ||
| 348 | list. */ | ||
| 349 | |||
| 350 | static Lisp_Object Qscalable_fonts_allowed; | ||
| 351 | |||
| 352 | /* The symbols `foreground-color' and `background-color' which can be | ||
| 353 | used as part of a `face' property. This is for compatibility with | ||
| 354 | Emacs 20.2. */ | ||
| 355 | |||
| 356 | Lisp_Object Qforeground_color, Qbackground_color; | ||
| 357 | |||
| 358 | /* The symbols `face' and `mouse-face' used as text properties. */ | ||
| 359 | |||
| 360 | Lisp_Object Qface; | ||
| 361 | |||
| 362 | /* Property for basic faces which other faces cannot inherit. */ | ||
| 363 | |||
| 364 | static Lisp_Object Qface_no_inherit; | ||
| 365 | |||
| 366 | /* Error symbol for wrong_type_argument in load_pixmap. */ | ||
| 367 | |||
| 368 | static Lisp_Object Qbitmap_spec_p; | ||
| 369 | |||
| 370 | /* The next ID to assign to Lisp faces. */ | 295 | /* The next ID to assign to Lisp faces. */ |
| 371 | 296 | ||
| 372 | static int next_lface_id; | 297 | static int next_lface_id; |
| @@ -376,14 +301,6 @@ static int next_lface_id; | |||
| 376 | static Lisp_Object *lface_id_to_name; | 301 | static Lisp_Object *lface_id_to_name; |
| 377 | static ptrdiff_t lface_id_to_name_size; | 302 | static ptrdiff_t lface_id_to_name_size; |
| 378 | 303 | ||
| 379 | /* TTY color-related functions (defined in tty-colors.el). */ | ||
| 380 | |||
| 381 | static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values; | ||
| 382 | |||
| 383 | /* The name of the function used to compute colors on TTYs. */ | ||
| 384 | |||
| 385 | static Lisp_Object Qtty_color_alist; | ||
| 386 | |||
| 387 | #ifdef HAVE_WINDOW_SYSTEM | 304 | #ifdef HAVE_WINDOW_SYSTEM |
| 388 | 305 | ||
| 389 | /* Counter for calls to clear_face_cache. If this counter reaches | 306 | /* Counter for calls to clear_face_cache. If this counter reaches |
| @@ -6397,9 +6314,17 @@ DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources, | |||
| 6397 | void | 6314 | void |
| 6398 | syms_of_xfaces (void) | 6315 | syms_of_xfaces (void) |
| 6399 | { | 6316 | { |
| 6317 | /* The symbols `face' and `mouse-face' used as text properties. */ | ||
| 6400 | DEFSYM (Qface, "face"); | 6318 | DEFSYM (Qface, "face"); |
| 6319 | |||
| 6320 | /* Property for basic faces which other faces cannot inherit. */ | ||
| 6401 | DEFSYM (Qface_no_inherit, "face-no-inherit"); | 6321 | DEFSYM (Qface_no_inherit, "face-no-inherit"); |
| 6322 | |||
| 6323 | /* Error symbol for wrong_type_argument in load_pixmap. */ | ||
| 6402 | DEFSYM (Qbitmap_spec_p, "bitmap-spec-p"); | 6324 | DEFSYM (Qbitmap_spec_p, "bitmap-spec-p"); |
| 6325 | |||
| 6326 | /* The name of the function to call when the background of the frame | ||
| 6327 | has changed, frame_set_background_mode. */ | ||
| 6403 | DEFSYM (Qframe_set_background_mode, "frame-set-background-mode"); | 6328 | DEFSYM (Qframe_set_background_mode, "frame-set-background-mode"); |
| 6404 | 6329 | ||
| 6405 | /* Lisp face attribute keywords. */ | 6330 | /* Lisp face attribute keywords. */ |
| @@ -6442,12 +6367,22 @@ syms_of_xfaces (void) | |||
| 6442 | DEFSYM (Qultra_bold, "ultra-bold"); | 6367 | DEFSYM (Qultra_bold, "ultra-bold"); |
| 6443 | DEFSYM (Qoblique, "oblique"); | 6368 | DEFSYM (Qoblique, "oblique"); |
| 6444 | DEFSYM (Qitalic, "italic"); | 6369 | DEFSYM (Qitalic, "italic"); |
| 6370 | |||
| 6371 | /* The symbols `foreground-color' and `background-color' which can be | ||
| 6372 | used as part of a `face' property. This is for compatibility with | ||
| 6373 | Emacs 20.2. */ | ||
| 6445 | DEFSYM (Qbackground_color, "background-color"); | 6374 | DEFSYM (Qbackground_color, "background-color"); |
| 6446 | DEFSYM (Qforeground_color, "foreground-color"); | 6375 | DEFSYM (Qforeground_color, "foreground-color"); |
| 6376 | |||
| 6447 | DEFSYM (Qunspecified, "unspecified"); | 6377 | DEFSYM (Qunspecified, "unspecified"); |
| 6448 | DEFSYM (QCignore_defface, ":ignore-defface"); | 6378 | DEFSYM (QCignore_defface, ":ignore-defface"); |
| 6449 | 6379 | ||
| 6380 | /* The symbol `face-alias'. A symbol having that property is an | ||
| 6381 | alias for another face. Value of the property is the name of | ||
| 6382 | the aliased face. */ | ||
| 6450 | DEFSYM (Qface_alias, "face-alias"); | 6383 | DEFSYM (Qface_alias, "face-alias"); |
| 6384 | |||
| 6385 | /* Names of basic faces. */ | ||
| 6451 | DEFSYM (Qdefault, "default"); | 6386 | DEFSYM (Qdefault, "default"); |
| 6452 | DEFSYM (Qtool_bar, "tool-bar"); | 6387 | DEFSYM (Qtool_bar, "tool-bar"); |
| 6453 | DEFSYM (Qregion, "region"); | 6388 | DEFSYM (Qregion, "region"); |
| @@ -6460,13 +6395,23 @@ syms_of_xfaces (void) | |||
| 6460 | DEFSYM (Qmouse, "mouse"); | 6395 | DEFSYM (Qmouse, "mouse"); |
| 6461 | DEFSYM (Qmode_line_inactive, "mode-line-inactive"); | 6396 | DEFSYM (Qmode_line_inactive, "mode-line-inactive"); |
| 6462 | DEFSYM (Qvertical_border, "vertical-border"); | 6397 | DEFSYM (Qvertical_border, "vertical-border"); |
| 6398 | |||
| 6399 | /* TTY color-related functions (defined in tty-colors.el). */ | ||
| 6463 | DEFSYM (Qwindow_divider, "window-divider"); | 6400 | DEFSYM (Qwindow_divider, "window-divider"); |
| 6464 | DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel"); | 6401 | DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel"); |
| 6465 | DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel"); | 6402 | DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel"); |
| 6466 | DEFSYM (Qtty_color_desc, "tty-color-desc"); | 6403 | DEFSYM (Qtty_color_desc, "tty-color-desc"); |
| 6467 | DEFSYM (Qtty_color_standard_values, "tty-color-standard-values"); | 6404 | DEFSYM (Qtty_color_standard_values, "tty-color-standard-values"); |
| 6468 | DEFSYM (Qtty_color_by_index, "tty-color-by-index"); | 6405 | DEFSYM (Qtty_color_by_index, "tty-color-by-index"); |
| 6406 | |||
| 6407 | /* The name of the function used to compute colors on TTYs. */ | ||
| 6469 | DEFSYM (Qtty_color_alist, "tty-color-alist"); | 6408 | DEFSYM (Qtty_color_alist, "tty-color-alist"); |
| 6409 | |||
| 6410 | /* Allowed scalable fonts. A value of nil means don't allow any | ||
| 6411 | scalable fonts. A value of t means allow the use of any scalable | ||
| 6412 | font. Otherwise, value must be a list of regular expressions. A | ||
| 6413 | font may be scaled if its name matches a regular expression in the | ||
| 6414 | list. */ | ||
| 6470 | DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed"); | 6415 | DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed"); |
| 6471 | 6416 | ||
| 6472 | Vparam_value_alist = list1 (Fcons (Qnil, Qnil)); | 6417 | Vparam_value_alist = list1 (Fcons (Qnil, Qnil)); |
diff --git a/src/xfns.c b/src/xfns.c index 2ea5f06e063..4a417526dcd 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -125,10 +125,6 @@ extern LWLIB_ID widget_id_tick; | |||
| 125 | 125 | ||
| 126 | #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) | 126 | #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) |
| 127 | 127 | ||
| 128 | static Lisp_Object Qundefined_color; | ||
| 129 | static Lisp_Object Qcompound_text, Qcancel_timer; | ||
| 130 | Lisp_Object Qfont_param; | ||
| 131 | |||
| 132 | #ifdef GLYPH_DEBUG | 128 | #ifdef GLYPH_DEBUG |
| 133 | static ptrdiff_t image_cache_refcount; | 129 | static ptrdiff_t image_cache_refcount; |
| 134 | static int dpyinfo_refcount; | 130 | static int dpyinfo_refcount; |
| @@ -5498,7 +5494,7 @@ Text larger than the specified size is clipped. */) | |||
| 5498 | if (!row->reversed_p) | 5494 | if (!row->reversed_p) |
| 5499 | { | 5495 | { |
| 5500 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 5496 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 5501 | if (INTEGERP (last->object)) | 5497 | if (NILP (last->object)) |
| 5502 | row_width -= last->pixel_width; | 5498 | row_width -= last->pixel_width; |
| 5503 | } | 5499 | } |
| 5504 | else | 5500 | else |
| @@ -5508,7 +5504,7 @@ Text larger than the specified size is clipped. */) | |||
| 5508 | Don't count that glyph. */ | 5504 | Don't count that glyph. */ |
| 5509 | struct glyph *g = row->glyphs[TEXT_AREA]; | 5505 | struct glyph *g = row->glyphs[TEXT_AREA]; |
| 5510 | 5506 | ||
| 5511 | if (g->type == STRETCH_GLYPH && INTEGERP (g->object)) | 5507 | if (g->type == STRETCH_GLYPH && NILP (g->object)) |
| 5512 | { | 5508 | { |
| 5513 | row_width -= g->pixel_width; | 5509 | row_width -= g->pixel_width; |
| 5514 | seen_reversed_p = 1; | 5510 | seen_reversed_p = 1; |
| @@ -5552,7 +5548,7 @@ Text larger than the specified size is clipped. */) | |||
| 5552 | if (row->used[TEXT_AREA] && !row->reversed_p) | 5548 | if (row->used[TEXT_AREA] && !row->reversed_p) |
| 5553 | { | 5549 | { |
| 5554 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 5550 | last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
| 5555 | if (INTEGERP (last->object)) | 5551 | if (NILP (last->object)) |
| 5556 | row_width -= last->pixel_width; | 5552 | row_width -= last->pixel_width; |
| 5557 | } | 5553 | } |
| 5558 | 5554 | ||
diff --git a/src/xftfont.c b/src/xftfont.c index f0ad8db0c28..c587d814efa 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -38,9 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | 38 | ||
| 39 | /* Xft font driver. */ | 39 | /* Xft font driver. */ |
| 40 | 40 | ||
| 41 | Lisp_Object Qxft; | ||
| 42 | static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden, | ||
| 43 | QClcdfilter; | ||
| 44 | 41 | ||
| 45 | /* The actual structure for Xft font that can be cast to struct | 42 | /* The actual structure for Xft font that can be cast to struct |
| 46 | font. */ | 43 | font. */ |
diff --git a/src/xmenu.c b/src/xmenu.c index c6bb9faee66..fd667a84343 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -108,8 +108,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 108 | #define TRUE 1 | 108 | #define TRUE 1 |
| 109 | #endif /* no TRUE */ | 109 | #endif /* no TRUE */ |
| 110 | 110 | ||
| 111 | static Lisp_Object Qdebug_on_next_call; | 111 | |
| 112 | |||
| 113 | /* Flag which when set indicates a dialog or menu has been posted by | 112 | /* Flag which when set indicates a dialog or menu has been posted by |
| 114 | Xt on behalf of one of the widget sets. */ | 113 | Xt on behalf of one of the widget sets. */ |
| 115 | static int popup_activated_flag; | 114 | static int popup_activated_flag; |
| @@ -29,8 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include "buffer.h" | 29 | #include "buffer.h" |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | static Lisp_Object Qlibxml2_dll; | ||
| 33 | |||
| 34 | #ifdef WINDOWSNT | 32 | #ifdef WINDOWSNT |
| 35 | 33 | ||
| 36 | # include <windows.h> | 34 | # include <windows.h> |
diff --git a/src/xselect.c b/src/xselect.c index 92460d115db..33ff366b89c 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -80,19 +80,6 @@ static void lisp_data_to_selection_data (struct x_display_info *, Lisp_Object, | |||
| 80 | #define TRACE2(fmt, a0, a1) (void) 0 | 80 | #define TRACE2(fmt, a0, a1) (void) 0 |
| 81 | #endif | 81 | #endif |
| 82 | 82 | ||
| 83 | |||
| 84 | static Lisp_Object QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, | ||
| 85 | QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL, | ||
| 86 | QATOM_PAIR, QCLIPBOARD_MANAGER, QSAVE_TARGETS; | ||
| 87 | |||
| 88 | static Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */ | ||
| 89 | static Lisp_Object QUTF8_STRING; /* This is a type of selection. */ | ||
| 90 | |||
| 91 | static Lisp_Object Qcompound_text_with_extensions; | ||
| 92 | |||
| 93 | static Lisp_Object Qforeign_selection; | ||
| 94 | static Lisp_Object Qx_lost_selection_functions, Qx_sent_selection_functions; | ||
| 95 | |||
| 96 | /* Bytes needed to represent 'long' data. This is as per libX11; it | 83 | /* Bytes needed to represent 'long' data. This is as per libX11; it |
| 97 | is not necessarily sizeof (long). */ | 84 | is not necessarily sizeof (long). */ |
| 98 | #define X_LONG_SIZE 4 | 85 | #define X_LONG_SIZE 4 |
| @@ -2687,8 +2674,11 @@ A value of 0 means wait as long as necessary. This is initialized from the | |||
| 2687 | DEFSYM (QCLIPBOARD, "CLIPBOARD"); | 2674 | DEFSYM (QCLIPBOARD, "CLIPBOARD"); |
| 2688 | DEFSYM (QTIMESTAMP, "TIMESTAMP"); | 2675 | DEFSYM (QTIMESTAMP, "TIMESTAMP"); |
| 2689 | DEFSYM (QTEXT, "TEXT"); | 2676 | DEFSYM (QTEXT, "TEXT"); |
| 2677 | |||
| 2678 | /* These are types of selection. */ | ||
| 2690 | DEFSYM (QCOMPOUND_TEXT, "COMPOUND_TEXT"); | 2679 | DEFSYM (QCOMPOUND_TEXT, "COMPOUND_TEXT"); |
| 2691 | DEFSYM (QUTF8_STRING, "UTF8_STRING"); | 2680 | DEFSYM (QUTF8_STRING, "UTF8_STRING"); |
| 2681 | |||
| 2692 | DEFSYM (QDELETE, "DELETE"); | 2682 | DEFSYM (QDELETE, "DELETE"); |
| 2693 | DEFSYM (QMULTIPLE, "MULTIPLE"); | 2683 | DEFSYM (QMULTIPLE, "MULTIPLE"); |
| 2694 | DEFSYM (QINCR, "INCR"); | 2684 | DEFSYM (QINCR, "INCR"); |
diff --git a/src/xsettings.c b/src/xsettings.c index ec45d47f9b7..8dbc7d990fe 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -51,8 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 51 | static char *current_mono_font; | 51 | static char *current_mono_font; |
| 52 | static char *current_font; | 52 | static char *current_font; |
| 53 | static struct x_display_info *first_dpyinfo; | 53 | static struct x_display_info *first_dpyinfo; |
| 54 | static Lisp_Object Qmonospace_font_name, Qfont_name, Qfont_render, | ||
| 55 | Qtool_bar_style; | ||
| 56 | static Lisp_Object current_tool_bar_style; | 54 | static Lisp_Object current_tool_bar_style; |
| 57 | 55 | ||
| 58 | /* Store an config changed event in to the event queue. */ | 56 | /* Store an config changed event in to the event queue. */ |
diff --git a/src/xterm.c b/src/xterm.c index e3f473986b2..9a87a1ee49c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -183,17 +183,9 @@ static Time ignore_next_mouse_click_timeout; | |||
| 183 | 183 | ||
| 184 | static int x_noop_count; | 184 | static int x_noop_count; |
| 185 | 185 | ||
| 186 | static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value; | ||
| 187 | |||
| 188 | static Lisp_Object Qvendor_specific_keysyms; | ||
| 189 | static Lisp_Object Qlatin_1; | ||
| 190 | |||
| 191 | #ifdef USE_GTK | 186 | #ifdef USE_GTK |
| 192 | /* The name of the Emacs icon file. */ | 187 | /* The name of the Emacs icon file. */ |
| 193 | static Lisp_Object xg_default_icon_file; | 188 | static Lisp_Object xg_default_icon_file; |
| 194 | |||
| 195 | /* Used in gtkutil.c. */ | ||
| 196 | Lisp_Object Qx_gtk_map_stock; | ||
| 197 | #endif | 189 | #endif |
| 198 | 190 | ||
| 199 | /* Some functions take this as char *, not const char *. */ | 191 | /* Some functions take this as char *, not const char *. */ |
diff --git a/src/xterm.h b/src/xterm.h index 25ce67b55d0..f2aff72e3ac 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1111,9 +1111,6 @@ extern bool x_session_have_connection (void); | |||
| 1111 | extern void x_session_close (void); | 1111 | extern void x_session_close (void); |
| 1112 | #endif | 1112 | #endif |
| 1113 | 1113 | ||
| 1114 | /* Defined in xterm.c */ | ||
| 1115 | |||
| 1116 | extern Lisp_Object Qx_gtk_map_stock; | ||
| 1117 | 1114 | ||
| 1118 | /* Is the frame embedded into another application? */ | 1115 | /* Is the frame embedded into another application? */ |
| 1119 | 1116 | ||