diff options
| author | Karoly Lorentey | 2007-01-01 17:38:32 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-01-01 17:38:32 +0000 |
| commit | 65e86587ab836aaa86b12ce30b219bcb4fcbaa06 (patch) | |
| tree | 7e13feee7387635f52df3613cf1bba4414781aab /src | |
| parent | 8c778e28bcf16b4baef6400a124ec2403941e940 (diff) | |
| parent | 1fc8c92b50100da709c94a0faa47deed5603634f (diff) | |
| download | emacs-65e86587ab836aaa86b12ce30b219bcb4fcbaa06.tar.gz emacs-65e86587ab836aaa86b12ce30b219bcb4fcbaa06.zip | |
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-536
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-537
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-538
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-539
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-540
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-541
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-542
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-543
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-544
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-545
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-546
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-547
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-548
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-549
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-550
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-551
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-552
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-553
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-554
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-555
erc-iswitchb: Temporarily enable iswitchb mode
* emacs@sv.gnu.org/emacs--devo--0--patch-556
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-557
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-558
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-559
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-560
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-561
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-562
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-563
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-564
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-565
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-566
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-567
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-568
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-569
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-570
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-571
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-572
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-573
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-574
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-575
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-576
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-577
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-578
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-579
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-580
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-581
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-582
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-583
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-584
Fix admin/quick-install-emacs to work with recent versions of autoconf
* emacs@sv.gnu.org/gnus--rel--5.10--patch-171
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-172
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-173
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-174
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-175
Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-176
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-177
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-178
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-179
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-180
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-181
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-182
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-183
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-184
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-185
Merge from emacs--devo--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-590
Diffstat (limited to 'src')
58 files changed, 1470 insertions, 486 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 5dc126f8d36..0561d53a937 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -34,6 +34,10 @@ handle 2 noprint pass | |||
| 34 | # Make it work like SIGINT normally does. | 34 | # Make it work like SIGINT normally does. |
| 35 | handle SIGTSTP nopass | 35 | handle SIGTSTP nopass |
| 36 | 36 | ||
| 37 | # Pass on user signals | ||
| 38 | handle SIGUSR1 noprint pass | ||
| 39 | handle SIGUSR2 noprint pass | ||
| 40 | |||
| 37 | # Don't pass SIGALRM to Emacs. This makes problems when | 41 | # Don't pass SIGALRM to Emacs. This makes problems when |
| 38 | # debugging. | 42 | # debugging. |
| 39 | handle SIGALRM ignore | 43 | handle SIGALRM ignore |
diff --git a/src/.gitignore b/src/.gitignore index 8dbbc9f86b6..9bb6e8932b6 100644 --- a/src/.gitignore +++ b/src/.gitignore | |||
| @@ -19,3 +19,4 @@ prefix-args | |||
| 19 | stamp-oldxmenu | 19 | stamp-oldxmenu |
| 20 | temacs | 20 | temacs |
| 21 | buildobj.lst | 21 | buildobj.lst |
| 22 | stamp_BLD | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 506ee83c8cb..3dc5a094d4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,348 @@ | |||
| 1 | 2006-12-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * gtkutil.c (update_frame_tool_bar): Connect create-menu-proxy with | ||
| 4 | xg_tool_bar_menu_proxy. | ||
| 5 | (xg_tool_bar_menu_proxy): New function. | ||
| 6 | (xg_tool_bar_proxy_callback): New function. | ||
| 7 | |||
| 8 | 2006-12-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 9 | |||
| 10 | * gtkutil.c (xg_tool_bar_button_cb): Save last modifier on widget. | ||
| 11 | (xg_tool_bar_callback): Remove check for button. | ||
| 12 | (update_frame_tool_bar): Put an event box in the tool bar and a button | ||
| 13 | in the event box. Attach enter/leave-notify-event to the event box. | ||
| 14 | |||
| 15 | 2006-12-30 Richard Stallman <rms@gnu.org> | ||
| 16 | |||
| 17 | * keymap.c (Fdefine_key): Doc fix. | ||
| 18 | |||
| 19 | 2006-12-29 Kim F. Storm <storm@cua.dk> | ||
| 20 | |||
| 21 | * frame.h (struct frame): New member minimize_tool_bar_window_p. | ||
| 22 | |||
| 23 | * xdisp.c (auto_resize_tool_bars_p): Replace with ... | ||
| 24 | (Vauto_resize_tool_bars): ... this. | ||
| 25 | (syms_of_xdisp): DEFVAR_LISP and initialize it. Update doc string | ||
| 26 | to describe new value `grow-only', and use of C-l. | ||
| 27 | (display_tool_bar_line): Only use default face for border below | ||
| 28 | toolbar if not grow-only (to get acceptable visual appearence). | ||
| 29 | Explicitly set visible_height for empty toolbar lines. | ||
| 30 | (redisplay_tool_bar): Handle `grow-only' setting. Check and clear | ||
| 31 | minimize_tool_bar_window_p flag. | ||
| 32 | |||
| 33 | * window.c (Frecenter): Set minimize_tool_bar_window_p flag | ||
| 34 | when called without arg to redraw with minimum toolbar height. | ||
| 35 | Update doc string. | ||
| 36 | |||
| 37 | 2006-12-29 Jason Rumney <jasonr@gnu.org> | ||
| 38 | |||
| 39 | * s/ms-w32.h (tzname): Do not define in msvc8. | ||
| 40 | (utime): Do not define in msvc8. | ||
| 41 | |||
| 42 | * regex.c (regerror): Change parameter name err_code. | ||
| 43 | |||
| 44 | 2006-12-26 Richard Stallman <rms@gnu.org> | ||
| 45 | |||
| 46 | * search.c (Fsearch_forward): Doc fix. | ||
| 47 | |||
| 48 | * callint.c (Finteractive): Doc fix. | ||
| 49 | |||
| 50 | 2006-12-25 Kim F. Storm <storm@cua.dk> | ||
| 51 | |||
| 52 | * s/ms-w32.h (BROKEN_DATAGRAM_SOCKETS): Define it. | ||
| 53 | |||
| 54 | 2006-12-23 Eli Zaretskii <eliz@gnu.org> | ||
| 55 | |||
| 56 | * keyboard.c (some_mouse_moved): Fix last change. | ||
| 57 | |||
| 58 | 2006-12-22 Eli Zaretskii <eliz@gnu.org> | ||
| 59 | |||
| 60 | * callproc.c (syms_of_callproc) <shell-file-name>: Doc fix. | ||
| 61 | |||
| 62 | 2006-12-22 Mark Davies <mark@mcs.vuw.ac.nz> | ||
| 63 | |||
| 64 | * m/amdx86-64.h, m/hp800.h: Add support for NetBSD. | ||
| 65 | * m/sh3el.h: New file. | ||
| 66 | |||
| 67 | 2006-12-22 Eli Zaretskii <eliz@gnu.org> | ||
| 68 | |||
| 69 | * makefile.w32-in (emacs, temacs): Depend on stamp_BLD instead of | ||
| 70 | $(BLD). | ||
| 71 | ($(OBJ0) $(OBJ1) $(WIN32OBJ)): New dependency on stamp_BLD. | ||
| 72 | (bootstrap-temacs): Pass $(XMFLAGS) to sub-make. | ||
| 73 | ($(OBJ0) $(OBJ1) $(WIN32OBJ)): Add lastfile.$(O) and firstfile.$(O). | ||
| 74 | (clean): Delete stamp_BLD. | ||
| 75 | |||
| 76 | 2006-12-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 77 | |||
| 78 | * macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]: Call | ||
| 79 | mac_update_proxy_icon also when buffer modification flag changed. | ||
| 80 | [TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias, | ||
| 81 | but compare FSRef/FSSpec of resolved alias. | ||
| 82 | |||
| 83 | 2006-12-21 Kim F. Storm <storm@cua.dk> | ||
| 84 | |||
| 85 | * w32.c (_sys_wait_accept): Fix handle leak. | ||
| 86 | |||
| 87 | 2006-12-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 88 | |||
| 89 | * sound.c: Include <alsa/asoundlib.h> if ALSA_SUBDIR_INCLUDE is | ||
| 90 | defined. | ||
| 91 | |||
| 92 | 2006-12-20 Kim F. Storm <storm@cua.dk> | ||
| 93 | |||
| 94 | * s/ms-w32.h (BROKEN_NON_BLOCKING_CONNECT): Define it. | ||
| 95 | |||
| 96 | 2006-12-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 97 | |||
| 98 | * keyboard.c (syms_of_keyboard) <double-click-time>: | ||
| 99 | * mac.c (Fmac_code_convert_string): | ||
| 100 | * search.c (Fsearch_forward): Doc fixes. | ||
| 101 | |||
| 102 | 2006-12-19 Kim F. Storm <storm@cua.dk> | ||
| 103 | |||
| 104 | Rework 2006-12-04 change. A SIGUSR1 (SIGUSR2) signal now generates | ||
| 105 | a sigusr1 event instead of [signal usr1] sequence, and signal events | ||
| 106 | are now supposed to be handled via special-event-map. | ||
| 107 | |||
| 108 | * keyboard.c (kbd_buffer_store_event_hold): Undo 2006-12-04 change. | ||
| 109 | (make_lispy_event): Don't generate Qsignal prefix for code 0. | ||
| 110 | Abort if signal code is unknown. | ||
| 111 | (store_user_signal_events): Don't make Qsignal prefix (code 0). | ||
| 112 | (Qsignal): Move declaration back to process.c. | ||
| 113 | (syms_of_keyboard): Don't intern or staticpro it here. | ||
| 114 | |||
| 115 | * process.c (Qsignal): Declare here. | ||
| 116 | (syms_of_process): Intern or staticpro it. | ||
| 117 | |||
| 118 | * emacs.c (main): Rename user signals to sigusr1 and sigusr2. | ||
| 119 | |||
| 120 | * .gdbinit: Pass on SIGUSR1 and SIGUSR2 to Emacs. | ||
| 121 | |||
| 122 | 2006-12-19 Juanma Barranquero <lekktu@gmail.com> | ||
| 123 | |||
| 124 | * buffer.c (syms_of_buffer) <buffer-display-table> | ||
| 125 | <scroll-up-aggressively, scroll-down-aggressively>: Doc fixes. | ||
| 126 | |||
| 127 | 2006-12-17 Richard Stallman <rms@gnu.org> | ||
| 128 | |||
| 129 | * fileio.c (Fread_file_name_internal): Pass Vread_file_name_predicate | ||
| 130 | to Ffile_name_completion. | ||
| 131 | |||
| 132 | * dired.c (file_name_completion): New arg PREDICATE. Some cleanup. | ||
| 133 | (Ffile_name_completion): New arg PREDICATE. | ||
| 134 | |||
| 135 | 2006-12-17 Juanma Barranquero <lekktu@gmail.com> | ||
| 136 | |||
| 137 | * buffer.c (Fkill_buffer): Doc fix. | ||
| 138 | (syms_of_buffer) <kill-buffer-query-functions>: Doc fix. | ||
| 139 | |||
| 140 | 2006-12-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 141 | |||
| 142 | * minibuf.c (Ftry_completion): Check that obarray buckets are symbols. | ||
| 143 | |||
| 144 | 2006-12-16 Eli Zaretskii <eliz@gnu.org> | ||
| 145 | |||
| 146 | * w32fns.c (w32-window-exists-p): New function. | ||
| 147 | (syms_of_w32fns): Defsubr it. | ||
| 148 | |||
| 149 | * prefix-args.c [STDC_HEADERS]: Include stdlib.h. | ||
| 150 | |||
| 151 | 2006-12-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 152 | |||
| 153 | * minibuf.c (Ftry_completion): Use `check_obarray' if ALIST is a vector. | ||
| 154 | |||
| 155 | 2006-12-15 Eli Zaretskii <eliz@gnu.org> | ||
| 156 | |||
| 157 | * emacs.c (USAGE3): Clarify documentation of --color. | ||
| 158 | |||
| 159 | 2006-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 160 | |||
| 161 | * mac.c (wakeup_from_rne_enabled_p) [TARGET_API_MAC_CARBON]: | ||
| 162 | New variable. | ||
| 163 | (ENABLE_WAKEUP_FROM_RNE, DISABLE_WAKEUP_FROM_RNE): New macros. | ||
| 164 | [!MAC_OSX] (select): Use them. | ||
| 165 | [MAC_OSX] (select_and_poll_event, sys_select): Likewise. | ||
| 166 | (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: New function. | ||
| 167 | |||
| 168 | * macfns.c (mac_atsu_font_face_attributes) [USE_ATSUI]: Add extern. | ||
| 169 | (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function. | ||
| 170 | (syms_of_macfns) [USE_ATSUI]: Defsubr it. | ||
| 171 | |||
| 172 | * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use | ||
| 173 | mac_wakeup_from_rne instead of mac_post_mouse_moved_event. | ||
| 174 | |||
| 175 | * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call | ||
| 176 | ATSUGetGlyphBounds if not necessary. | ||
| 177 | (Vmac_atsu_font_table) [USE_ATSUI]: Remove variable. | ||
| 178 | (syms_of_macterm) [USE_ATSUI]: Don't defvar it. | ||
| 179 | (fm_get_style_from_font, atsu_find_font_from_family_name) | ||
| 180 | (atsu_find_font_family_name, mac_atsu_font_face_attributes) | ||
| 181 | [USE_ATSUI]: New functions. | ||
| 182 | (init_font_name_table) [USE_ATSUI]: Use atsu_find_font_family_name. | ||
| 183 | (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name. | ||
| 184 | Don't get metrics for Latin-1 right half characters. | ||
| 185 | (mac_load_query_font): Don't load font if space width is not positive. | ||
| 186 | [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use | ||
| 187 | mac_wakeup_from_rne instead of mac_post_mouse_moved_event. | ||
| 188 | (XTread_socket): Call SelectWindow when unfocused frame is clicked. | ||
| 189 | |||
| 190 | * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern. | ||
| 191 | |||
| 192 | 2006-12-15 Kim F. Storm <storm@cua.dk> | ||
| 193 | |||
| 194 | * keyboard.c (ignore_mouse_drag_p): New global var. | ||
| 195 | (some_mouse_moved): Return 0 if it is non-zero. | ||
| 196 | (make_lispy_event): Generate click event on mouse up if | ||
| 197 | ignore_mouse_drag_p is non-zero, even if mouse moved. | ||
| 198 | Clear ignore_mouse_drag_p on mouse down/up. | ||
| 199 | |||
| 200 | * xdisp.c (redisplay_window): Set ignore_mouse_drag_p if tool-bar | ||
| 201 | is resized to avoid generating a mouse drag event. | ||
| 202 | |||
| 203 | 2006-12-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 204 | |||
| 205 | * w32fns.c (w32_wnd_proc): Force non-tooltip frames to respect the | ||
| 206 | minimum tracking size. Remove non-working old hack to do the same. | ||
| 207 | |||
| 208 | 2006-12-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 209 | |||
| 210 | * emacs.c (handle_user_signal): Move function to keyboard.c. | ||
| 211 | (main): Use add_user_signal for SIGUSR1 and SIGUSR2. | ||
| 212 | |||
| 213 | * keyboard.c (make_lispy_event): Use find_user_signal_name. | ||
| 214 | (read_avail_input): Store pending user signal events. | ||
| 215 | (struct user_signal_info): New struct. | ||
| 216 | (user_signals): New variable. | ||
| 217 | (add_user_signal, store_user_signal_events) | ||
| 218 | (find_user_signal_name): New functions. | ||
| 219 | (handle_user_signal): Move function from emacs.c. Don't store | ||
| 220 | USER_SIGNAL_EVENT here, but increment number of pending signals. | ||
| 221 | |||
| 222 | * keyboard.h (add_user_signals): Add extern. | ||
| 223 | |||
| 224 | 2006-12-11 Juanma Barranquero <lekktu@gmail.com> | ||
| 225 | |||
| 226 | * buffer.c (syms_of_buffer) <cursor-in-non-selected-windows>: | ||
| 227 | <default-scroll-up-aggressively, default-scroll-down-aggressively>: | ||
| 228 | <line-spacing, left-margin>: Doc fixes. | ||
| 229 | |||
| 230 | * xdisp.c (syms_of_xdisp) <mode-line-inverse-video>: Doc fix. | ||
| 231 | |||
| 232 | 2006-12-10 Kim F. Storm <storm@cua.dk> | ||
| 233 | |||
| 234 | * xdisp.c (show_mouse_face): Never use text cursor in tool-bar. | ||
| 235 | |||
| 236 | 2006-12-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 237 | |||
| 238 | * abbrev.c (syms_of_abbrev) <last-abbrev-text>: | ||
| 239 | * buffer.c (syms_of_buffer) <default-major-mode>: | ||
| 240 | * keymap.c (Flookup_key): | ||
| 241 | * lread.c (Feval_buffer, Feval_region): | ||
| 242 | * macterm.c (syms_of_macterm) <x-use-underline-position-properties>: | ||
| 243 | <x-underline-at-descent-line, mac-emulate-three-button-mouse>: | ||
| 244 | * marker.c (Fmarker_insertion_type): | ||
| 245 | * minibuf.c (syms_of_minibuf) <minibuffer-completion-table>: | ||
| 246 | * msdos.c (syms_of_msdos) <delete-exited-processes>: | ||
| 247 | * w32term.c (syms_of_w32term) <x-use-underline-position-properties>: | ||
| 248 | <x-underline-at-descent-line>: | ||
| 249 | * xdisp.c (format-mode-line): | ||
| 250 | * xterm.c (syms_of_xterm) <x-use-underline-position-properties>: | ||
| 251 | <x-underline-at-descent-line>: Doc fixes. | ||
| 252 | |||
| 253 | 2006-12-10 Andreas Schwab <schwab@suse.de> | ||
| 254 | |||
| 255 | * systime.h (EMACS_GET_TIME): Remove check for | ||
| 256 | HAVE_STRUCT_TIMEZONE which is never defined. | ||
| 257 | |||
| 258 | 2006-12-10 Alan Mackenzie <acm@muc.de> | ||
| 259 | |||
| 260 | * syntax.c (Fpartial_parse_sexp): Correct Docco: Elt 8 of the | ||
| 261 | result is now neither the last elt nor optional for OLDSTATE. | ||
| 262 | |||
| 263 | 2006-12-09 Eli Zaretskii <eliz@gnu.org> | ||
| 264 | |||
| 265 | * process.c (Fsignal_process): Doc fix. Use XFLOAT_DATA to | ||
| 266 | extract the process ID from a Lisp float. | ||
| 267 | |||
| 268 | 2006-12-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 269 | |||
| 270 | * xterm.c (XTframe_raise_lower): Comment out _NET_ACTIVE_WINDOW code. | ||
| 271 | |||
| 272 | 2006-12-08 Eli Zaretskii <eliz@gnu.org> | ||
| 273 | |||
| 274 | * frame.h (PIX_TYPE): Redefine as `unsigned long', for 64-bit | ||
| 275 | platforms where long is 64-bit. | ||
| 276 | |||
| 277 | * msdos.h (PIX_TYPE): Redefine as `unsigned long'. | ||
| 278 | |||
| 279 | 2006-12-08 NAKAJI Hiroyuki <nakaji@jp.freebsd.org> (tiny change) | ||
| 280 | |||
| 281 | * m/amdx86-64.h: Add support for Solaris 10 on x86-64. | ||
| 282 | |||
| 283 | 2006-12-08 Kenichi Handa <handa@m17n.org> | ||
| 284 | |||
| 285 | * xterm.c (x_query_font): Use xstricmp instead off strcasecmp. | ||
| 286 | |||
| 287 | 2006-12-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 288 | |||
| 289 | * emacs.c (syms_of_emacs) <system-type>: Doc fix. | ||
| 290 | |||
| 291 | 2006-12-07 Kim F. Storm <storm@cua.dk> | ||
| 292 | |||
| 293 | * process.c (parse_signal): Use xstricmp instead of strcasecmp. | ||
| 294 | (Fsignal_process): Don't use strncasecmp. | ||
| 295 | |||
| 296 | 2006-12-05 Glenn Morris <rgm@gnu.org> | ||
| 297 | |||
| 298 | * abbrev.c (Qforce): New Lisp_Object. | ||
| 299 | (Fdefine_abbrev): Do not overwrite non-system abbrevs with system | ||
| 300 | abbrevs, unless 'force is applied. | ||
| 301 | (syms_of_abbrev): Add Qforce. | ||
| 302 | |||
| 303 | 2006-12-04 Kim F. Storm <storm@cua.dk> | ||
| 304 | |||
| 305 | * process.c (parse_signal): Rename macro from handle_signal. | ||
| 306 | (Fsignal_process): Also accept lower-case variants of signal | ||
| 307 | names (to align with signal names generated by Emacs itself). | ||
| 308 | |||
| 309 | * emacs.c (handle_USR1_signal, handle_USR2_signal): Replace by... | ||
| 310 | (handle_user_signal): ... this, which generates two USER_SIGNAL_EVENTs | ||
| 311 | first with code == 0 [signal] and one with code == sig number. | ||
| 312 | (main): Use it as handler for SIGUR1 and SIGUSR2. | ||
| 313 | |||
| 314 | * keyboard.c (kbd_buffer_store_event_hold): Don't throw-on-input | ||
| 315 | if first event in [signal xxx] sequence. | ||
| 316 | (lispy_user_signals, Qusr1_signal, Qusr2_signal): Remove. | ||
| 317 | (syms_of_keyboard): Don't intern and staticpro them. | ||
| 318 | (Qsignal): Declare here. | ||
| 319 | (syms_of_keyboard): Intern and staticpro it. | ||
| 320 | (make_lispy_event): Use it. Intern symbols on the fly for other | ||
| 321 | USER_SIGNAL_EVENTs events. | ||
| 322 | |||
| 323 | * process.c (Qsignal): Declare extern. | ||
| 324 | (syms_of_process): Don't intern/staticpro it here. | ||
| 325 | |||
| 326 | * process.c (read_process_output): Abort if carryover < 0. | ||
| 327 | |||
| 328 | 2006-12-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 329 | |||
| 330 | * config.in: Regenerate. | ||
| 331 | |||
| 332 | * fileio.c [__NetBSD__]: Don't define `unix'. | ||
| 333 | (Funix_sync, syms_of_fileio): Use `#ifdef HAVE_SYNC' instead of | ||
| 334 | `#ifdef unix'. | ||
| 335 | |||
| 336 | 2006-12-04 Glenn Morris <rgm@gnu.org> | ||
| 337 | |||
| 338 | * Makefile.in (version): New variable, set by configure. | ||
| 339 | (bootstrapclean, mostlyclean): Also remove emacs-${version}. | ||
| 340 | |||
| 341 | 2006-12-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 342 | |||
| 343 | * gtkutil.c (update_frame_tool_bar): Handle modifying a toolbar item | ||
| 344 | without an image. | ||
| 345 | |||
| 1 | 2006-12-01 Eli Zaretskii <eliz@gnu.org> | 346 | 2006-12-01 Eli Zaretskii <eliz@gnu.org> |
| 2 | 347 | ||
| 3 | * w32fns.c (Fw32_shell_execute): Doc fix. | 348 | * w32fns.c (Fw32_shell_execute): Doc fix. |
| @@ -466,7 +811,7 @@ | |||
| 466 | 2006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 811 | 2006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 467 | 812 | ||
| 468 | * xselect.c (x_handle_selection_request): If the converted_selection | 813 | * xselect.c (x_handle_selection_request): If the converted_selection |
| 469 | is NIL or XCDR (converted_selection) is NIL, decline the request. | 814 | is nil or XCDR (converted_selection) is nil, decline the request. |
| 470 | 815 | ||
| 471 | 2006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 816 | 2006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 472 | 817 | ||
| @@ -2571,8 +2916,8 @@ | |||
| 2571 | (struct sound_device): Add period_size. | 2916 | (struct sound_device): Add period_size. |
| 2572 | (wav_play, au_play): Use period_size if set. | 2917 | (wav_play, au_play): Use period_size if set. |
| 2573 | 2918 | ||
| 2574 | * Makefile.in (CFLAGS_SOUND): New flags for ALSA | 2919 | * Makefile.in (CFLAGS_SOUND): New flags for ALSA. |
| 2575 | (ALL_CFLAGS): Add CFLAGS_SOUND | 2920 | (ALL_CFLAGS): Add CFLAGS_SOUND. |
| 2576 | 2921 | ||
| 2577 | 2006-05-18 Kenichi Handa <handa@m17n.org> | 2922 | 2006-05-18 Kenichi Handa <handa@m17n.org> |
| 2578 | 2923 | ||
| @@ -4196,8 +4541,8 @@ | |||
| 4196 | 4541 | ||
| 4197 | 2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 4542 | 2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 4198 | 4543 | ||
| 4199 | * gtkutil.c (update_frame_tool_bar): Use new tool bar functions | 4544 | * gtkutil.c (update_frame_tool_bar): Use new tool bar function |
| 4200 | (gtk_toolbar_insert) so we can have tool bars of different sizes. | 4545 | gtk_toolbar_insert() so we can have tool bars of different sizes. |
| 4201 | 4546 | ||
| 4202 | 2006-01-30 Luc Teirlinck <teirllm@auburn.edu> | 4547 | 2006-01-30 Luc Teirlinck <teirllm@auburn.edu> |
| 4203 | 4548 | ||
| @@ -4525,7 +4870,7 @@ | |||
| 4525 | 4870 | ||
| 4526 | 2005-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 4871 | 2005-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 4527 | 4872 | ||
| 4528 | * xfns.c: x_show_hidden_files, new variable. | 4873 | * xfns.c (x_show_hidden_files): New variable. |
| 4529 | (syms_of_xfns): Defvar it. | 4874 | (syms_of_xfns): Defvar it. |
| 4530 | 4875 | ||
| 4531 | * gtkutil.c (xg_toggle_visibility_cb): New function. | 4876 | * gtkutil.c (xg_toggle_visibility_cb): New function. |
| @@ -6810,7 +7155,7 @@ | |||
| 6810 | 7155 | ||
| 6811 | * w32console.c (initialize_w32_display): Detect when the console | 7156 | * w32console.c (initialize_w32_display): Detect when the console |
| 6812 | dimensions are insane, and default to 80x25 instead. | 7157 | dimensions are insane, and default to 80x25 instead. |
| 6813 | (w32_use_full_screen_buffer): Default to NIL. | 7158 | (w32_use_full_screen_buffer): Default to nil. |
| 6814 | 7159 | ||
| 6815 | 2005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 7160 | 2005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 6816 | 7161 | ||
| @@ -10019,7 +10364,7 @@ | |||
| 10019 | 10364 | ||
| 10020 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff | 10365 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff |
| 10021 | for left and top calculations. Remove call to x_real_positions. | 10366 | for left and top calculations. Remove call to x_real_positions. |
| 10022 | [Bug report by Drew Adams in November] | 10367 | [Bug report by Drew Adams in November.] |
| 10023 | (x_check_expected_move): Do not set change_gravity to 1 when calling | 10368 | (x_check_expected_move): Do not set change_gravity to 1 when calling |
| 10024 | x_set_offset. | 10369 | x_set_offset. |
| 10025 | 10370 | ||
| @@ -10069,8 +10414,8 @@ | |||
| 10069 | new variables main_thread and alloc_mutex, | 10414 | new variables main_thread and alloc_mutex, |
| 10070 | define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect | 10415 | define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect |
| 10071 | emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread. | 10416 | emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread. |
| 10072 | If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same as | 10417 | If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same |
| 10073 | (UN)BLOCK_INPUT. | 10418 | as (UN)BLOCK_INPUT. |
| 10074 | (emacs_blocked_free, emacs_blocked_malloc) | 10419 | (emacs_blocked_free, emacs_blocked_malloc) |
| 10075 | (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC. | 10420 | (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC. |
| 10076 | (uninterrupt_malloc): Initialize main_thread and alloc_mutex. | 10421 | (uninterrupt_malloc): Initialize main_thread and alloc_mutex. |
| @@ -10080,7 +10425,7 @@ | |||
| 10080 | 10425 | ||
| 10081 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. | 10426 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. |
| 10082 | 10427 | ||
| 10083 | * keyboard.c: Conditionally include pthread.h | 10428 | * keyboard.c: Conditionally include pthread.h. |
| 10084 | (handle_async_input, input_available_signalt): If not in the main | 10429 | (handle_async_input, input_available_signalt): If not in the main |
| 10085 | thread, block signal, send signal to main thread and return. | 10430 | thread, block signal, send signal to main thread and return. |
| 10086 | 10431 | ||
| @@ -10890,7 +11235,7 @@ | |||
| 10890 | 11235 | ||
| 10891 | 2004-11-02 Kim F. Storm <storm@cua.dk> | 11236 | 2004-11-02 Kim F. Storm <storm@cua.dk> |
| 10892 | 11237 | ||
| 10893 | * Makefile.in (callproc.o): Depend on blockinput.h atimer.h systime.h. | 11238 | * Makefile.in (callproc.o): Depend on blockinput.h, atimer.h, systime.h. |
| 10894 | 11239 | ||
| 10895 | 2004-11-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 11240 | 2004-11-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 10896 | 11241 | ||
| @@ -10951,10 +11296,9 @@ | |||
| 10951 | * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. | 11296 | * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. |
| 10952 | Check only_dir_p instead of comparing prompt to "Dired". | 11297 | Check only_dir_p instead of comparing prompt to "Dired". |
| 10953 | 11298 | ||
| 10954 | * gtkutil.c (xg_get_file_with_chooser) | 11299 | * gtkutil.c (xg_get_file_with_chooser, xg_get_file_with_selection): |
| 10955 | (xg_get_file_with_selection): New functions, only defined ifdef | 11300 | New functions, only defined ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW |
| 10956 | HAVE_GTK_FILE_CHOOSER_DIALOG_NEW and HAVE_GTK_FILE_SELECTION_NEW | 11301 | and HAVE_GTK_FILE_SELECTION_NEW respectively. |
| 10957 | respectively. | ||
| 10958 | (xg_get_file_name): Add parameter only_dir_p. | 11302 | (xg_get_file_name): Add parameter only_dir_p. |
| 10959 | Call xg_get_file_with_chooser or xg_get_file_with_selection | 11303 | Call xg_get_file_with_chooser or xg_get_file_with_selection |
| 10960 | depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog. | 11304 | depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog. |
| @@ -10991,7 +11335,7 @@ | |||
| 10991 | tool_bar_items to assignment of result. | 11335 | tool_bar_items to assignment of result. |
| 10992 | 11336 | ||
| 10993 | * atimer.c (alarm_signal_handler): Do not call set_alarm if | 11337 | * atimer.c (alarm_signal_handler): Do not call set_alarm if |
| 10994 | pending_atmers is non-zero. | 11338 | pending_atimers is non-zero. |
| 10995 | 11339 | ||
| 10996 | 2004-10-31 Kim F. Storm <storm@cua.dk> | 11340 | 2004-10-31 Kim F. Storm <storm@cua.dk> |
| 10997 | 11341 | ||
| @@ -14611,14 +14955,14 @@ | |||
| 14611 | * xterm.c (handle_one_xevent): Call x_handle_dnd_message for | 14955 | * xterm.c (handle_one_xevent): Call x_handle_dnd_message for |
| 14612 | ClientMessages. | 14956 | ClientMessages. |
| 14613 | 14957 | ||
| 14614 | * xselect.c: Include termhooks.h and X11/Xproto.h | 14958 | * xselect.c: Include termhooks.h and X11/Xproto.h. |
| 14615 | (x_check_property_data, x_fill_property_data) | 14959 | (x_check_property_data, x_fill_property_data) |
| 14616 | (x_property_data_to_lisp, mouse_position_for_drop) | 14960 | (x_property_data_to_lisp, mouse_position_for_drop) |
| 14617 | (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support. | 14961 | (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support. |
| 14618 | (Fx_send_client_event): Move here from xfns.c. | 14962 | (Fx_send_client_event): Move here from xfns.c. |
| 14619 | (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message. | 14963 | (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message. |
| 14620 | 14964 | ||
| 14621 | * xfns.c (x-send-client-message): Move to xselect.c | 14965 | * xfns.c (x-send-client-message): Move to xselect.c. |
| 14622 | (Fx_change_window_property): Add optional arguments TYPE, FORMAT and | 14966 | (Fx_change_window_property): Add optional arguments TYPE, FORMAT and |
| 14623 | OUTER_P. | 14967 | OUTER_P. |
| 14624 | (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P, | 14968 | (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P, |
| @@ -18179,7 +18523,7 @@ | |||
| 18179 | 18523 | ||
| 18180 | 2003-03-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 18524 | 2003-03-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 18181 | 18525 | ||
| 18182 | * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif | 18526 | * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif. |
| 18183 | 18527 | ||
| 18184 | * gtkutil.h: Take two more arguments to xg_update_scrollbar_pos. | 18528 | * gtkutil.h: Take two more arguments to xg_update_scrollbar_pos. |
| 18185 | (XG_SB_RANGE): New define. | 18529 | (XG_SB_RANGE): New define. |
| @@ -18416,7 +18760,7 @@ | |||
| 18416 | * gtkutil.c: Removed handle_fixed_child, struct xg_last_sb_pos. | 18760 | * gtkutil.c: Removed handle_fixed_child, struct xg_last_sb_pos. |
| 18417 | (xg_resize_widgets): Don't call foreach(handle_fixed_child). | 18761 | (xg_resize_widgets): Don't call foreach(handle_fixed_child). |
| 18418 | (xg_gtk_scroll_destroy): Remove free of struct xg_last_sb_pos. | 18762 | (xg_gtk_scroll_destroy): Remove free of struct xg_last_sb_pos. |
| 18419 | (scroll_bar_button_cb): Set bar->dragging to NIL on button release. | 18763 | (scroll_bar_button_cb): Set bar->dragging to nil on button release. |
| 18420 | (xg_create_scroll_bar): Pass bar to button event callback. | 18764 | (xg_create_scroll_bar): Pass bar to button event callback. |
| 18421 | (xg_find_top_left_in_fixed): New function. | 18765 | (xg_find_top_left_in_fixed): New function. |
| 18422 | (xg_update_scrollbar_pos): Don't call gdk_window_clear on | 18766 | (xg_update_scrollbar_pos): Don't call gdk_window_clear on |
| @@ -18717,7 +19061,7 @@ | |||
| 18717 | 2003-02-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 19061 | 2003-02-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 18718 | 19062 | ||
| 18719 | * keyboard.c (cancel_hourglass_unwind): Surround with | 19063 | * keyboard.c (cancel_hourglass_unwind): Surround with |
| 18720 | #ifdef HAVE_X_WINDOWS | 19064 | #ifdef HAVE_X_WINDOWS. |
| 18721 | 19065 | ||
| 18722 | 2003-02-25 Kenichi Handa <handa@m17n.org> | 19066 | 2003-02-25 Kenichi Handa <handa@m17n.org> |
| 18723 | 19067 | ||
| @@ -19278,7 +19622,7 @@ | |||
| 19278 | 19622 | ||
| 19279 | 2003-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 19623 | 2003-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 19280 | 19624 | ||
| 19281 | * gtkutil.c: Must include stdio.h before termhooks.h | 19625 | * gtkutil.c: Must include stdio.h before termhooks.h. |
| 19282 | 19626 | ||
| 19283 | 2003-01-21 Dave Love <fx@gnu.org> | 19627 | 2003-01-21 Dave Love <fx@gnu.org> |
| 19284 | 19628 | ||
| @@ -19324,7 +19668,7 @@ | |||
| 19324 | * xterm.c (handle_one_xevent): Surround popup_activated | 19668 | * xterm.c (handle_one_xevent): Surround popup_activated |
| 19325 | with #ifdef:s for non-toolkit version. | 19669 | with #ifdef:s for non-toolkit version. |
| 19326 | 19670 | ||
| 19327 | * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK | 19671 | * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK. |
| 19328 | (gtkutil.o): New file. | 19672 | (gtkutil.o): New file. |
| 19329 | (TOOLKIT_DEFINES): Set to -DUSE_GTK if HAVE_GTK. | 19673 | (TOOLKIT_DEFINES): Set to -DUSE_GTK if HAVE_GTK. |
| 19330 | (LIBW): Set to @GTK_LIBS@ if USE_GTK. | 19674 | (LIBW): Set to @GTK_LIBS@ if USE_GTK. |
| @@ -19370,7 +19714,7 @@ | |||
| 19370 | (syms_of_xterm): Set Vx_toolkit_scroll_bars for USE_GTK. | 19714 | (syms_of_xterm): Set Vx_toolkit_scroll_bars for USE_GTK. |
| 19371 | 19715 | ||
| 19372 | * xmenu.c: Include gtkutil.h for USE_GTK. | 19716 | * xmenu.c: Include gtkutil.h for USE_GTK. |
| 19373 | (Fx_popup_menu): Use current position if x and y is NIL. | 19717 | (Fx_popup_menu): Use current position if x and y are nil. |
| 19374 | (single_menu_item, single_menu_item, Fx_popup_dialog): | 19718 | (single_menu_item, single_menu_item, Fx_popup_dialog): |
| 19375 | Check for USE_GTK. | 19719 | Check for USE_GTK. |
| 19376 | (popup_widget_loop): New function for USE_GTK. | 19720 | (popup_widget_loop): New function for USE_GTK. |
| @@ -19400,7 +19744,7 @@ | |||
| 19400 | (x_set_tool_bar_lines): Call update_frame_tool_bar for USE_GTK. | 19744 | (x_set_tool_bar_lines): Call update_frame_tool_bar for USE_GTK. |
| 19401 | (x_set_name, x_set_title): Call gtk_window_set_title for USE_GTK. | 19745 | (x_set_name, x_set_title): Call gtk_window_set_title for USE_GTK. |
| 19402 | (x_window): Call xg_create_frame_widgets for USE_GTK. | 19746 | (x_window): Call xg_create_frame_widgets for USE_GTK. |
| 19403 | (Fx_create_frame): Check for USE_GTK | 19747 | (Fx_create_frame): Check for USE_GTK. |
| 19404 | (Fx_file_dialog): New implementation for USE_GTK. | 19748 | (Fx_file_dialog): New implementation for USE_GTK. |
| 19405 | 19749 | ||
| 19406 | * xdisp.c: Add check for USE_GTK for extern void set_frame_menubar. | 19750 | * xdisp.c: Add check for USE_GTK for extern void set_frame_menubar. |
| @@ -19427,7 +19771,7 @@ | |||
| 19427 | * dispnew.c (adjust_frame_glyphs_for_window_redisplay): | 19771 | * dispnew.c (adjust_frame_glyphs_for_window_redisplay): |
| 19428 | Add check for USE_GTK. | 19772 | Add check for USE_GTK. |
| 19429 | 19773 | ||
| 19430 | * config.in: Added HAVE_GTK | 19774 | * config.in: Added HAVE_GTK. |
| 19431 | 19775 | ||
| 19432 | * alloc.c (Fgarbage_collect): Call xg_mark_data for GTK. | 19776 | * alloc.c (Fgarbage_collect): Call xg_mark_data for GTK. |
| 19433 | 19777 | ||
| @@ -20653,7 +20997,7 @@ | |||
| 20653 | Only when it is non-nil, handle composition sequence. | 20997 | Only when it is non-nil, handle composition sequence. |
| 20654 | (setup_coding_system) <0>: Don't force composition handling. | 20998 | (setup_coding_system) <0>: Don't force composition handling. |
| 20655 | 20999 | ||
| 20656 | * Makefile.in (lisp, shortlisp): Add utf-16.elc | 21000 | * Makefile.in (lisp, shortlisp): Add utf-16.elc. |
| 20657 | 21001 | ||
| 20658 | 2002-09-29 Richard M. Stallman <rms@gnu.org> | 21002 | 2002-09-29 Richard M. Stallman <rms@gnu.org> |
| 20659 | 21003 | ||
diff --git a/src/Makefile.in b/src/Makefile.in index 71eaeadb6ba..94fe5dee41f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -38,6 +38,7 @@ CPPFLAGS=@CPPFLAGS@ | |||
| 38 | LDFLAGS=@LDFLAGS@ | 38 | LDFLAGS=@LDFLAGS@ |
| 39 | LN_S=@LN_S@ | 39 | LN_S=@LN_S@ |
| 40 | EXEEXT=@EXEEXT@ | 40 | EXEEXT=@EXEEXT@ |
| 41 | version=@version@ | ||
| 41 | # Substitute an assignment for the MAKE variable, because | 42 | # Substitute an assignment for the MAKE variable, because |
| 42 | # BSD doesn't have it as a default. | 43 | # BSD doesn't have it as a default. |
| 43 | @SET_MAKE@ | 44 | @SET_MAKE@ |
| @@ -1320,11 +1321,11 @@ ${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r | |||
| 1320 | ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c | 1321 | ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c |
| 1321 | cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT} | 1322 | cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT} |
| 1322 | bootstrapclean: | 1323 | bootstrapclean: |
| 1323 | rm -f bootstrap-emacs${EXEEXT} | 1324 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} |
| 1324 | mostlyclean: | 1325 | mostlyclean: |
| 1325 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1326 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 1326 | rm -f ../etc/DOC | 1327 | rm -f ../etc/DOC |
| 1327 | rm -f bootstrap-emacs${EXEEXT} | 1328 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} |
| 1328 | rm -f buildobj.lst | 1329 | rm -f buildobj.lst |
| 1329 | clean: mostlyclean | 1330 | clean: mostlyclean |
| 1330 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} | 1331 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} |
diff --git a/src/abbrev.c b/src/abbrev.c index e371797f139..45d00728242 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -83,7 +83,7 @@ EMACS_INT last_abbrev_point; | |||
| 83 | 83 | ||
| 84 | Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; | 84 | Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; |
| 85 | 85 | ||
| 86 | Lisp_Object Qsystem_type, Qcount; | 86 | Lisp_Object Qsystem_type, Qcount, Qforce; |
| 87 | 87 | ||
| 88 | DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0, | 88 | DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0, |
| 89 | doc: /* Create a new, empty abbrev table object. */) | 89 | doc: /* Create a new, empty abbrev table object. */) |
| @@ -107,7 +107,7 @@ DEFUN ("clear-abbrev-table", Fclear_abbrev_table, Sclear_abbrev_table, 1, 1, 0, | |||
| 107 | XVECTOR (table)->contents[i] = make_number (0); | 107 | XVECTOR (table)->contents[i] = make_number (0); |
| 108 | return Qnil; | 108 | return Qnil; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, | 111 | DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, |
| 112 | doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. | 112 | doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. |
| 113 | NAME must be a string. | 113 | NAME must be a string. |
| @@ -123,7 +123,9 @@ usage-count, which is incremented each time the abbrev is used. | |||
| 123 | \(The default is zero.) | 123 | \(The default is zero.) |
| 124 | 124 | ||
| 125 | SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation | 125 | SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation |
| 126 | which should not be saved in the user's abbreviation file. */) | 126 | which should not be saved in the user's abbreviation file. |
| 127 | Unless SYSTEM-FLAG is `force', a system abbreviation will not | ||
| 128 | overwrite a non-system abbreviation of the same name. */) | ||
| 127 | (table, name, expansion, hook, count, system_flag) | 129 | (table, name, expansion, hook, count, system_flag) |
| 128 | Lisp_Object table, name, expansion, hook, count, system_flag; | 130 | Lisp_Object table, name, expansion, hook, count, system_flag; |
| 129 | { | 131 | { |
| @@ -131,6 +133,16 @@ which should not be saved in the user's abbreviation file. */) | |||
| 131 | CHECK_VECTOR (table); | 133 | CHECK_VECTOR (table); |
| 132 | CHECK_STRING (name); | 134 | CHECK_STRING (name); |
| 133 | 135 | ||
| 136 | /* If defining a system abbrev, do not overwrite a non-system abbrev | ||
| 137 | of the same name, unless 'force is used. */ | ||
| 138 | if (!NILP (system_flag) && !EQ (system_flag, Qforce)) | ||
| 139 | { | ||
| 140 | sym = Fintern_soft (name, table); | ||
| 141 | |||
| 142 | if (!NILP (SYMBOL_VALUE (sym)) && | ||
| 143 | NILP (Fplist_get (XSYMBOL (sym)->plist, Qsystem_type))) return Qnil; | ||
| 144 | } | ||
| 145 | |||
| 134 | if (NILP (count)) | 146 | if (NILP (count)) |
| 135 | count = make_number (0); | 147 | count = make_number (0); |
| 136 | else | 148 | else |
| @@ -640,6 +652,9 @@ syms_of_abbrev () | |||
| 640 | Qcount = intern ("count"); | 652 | Qcount = intern ("count"); |
| 641 | staticpro (&Qcount); | 653 | staticpro (&Qcount); |
| 642 | 654 | ||
| 655 | Qforce = intern ("force"); | ||
| 656 | staticpro (&Qforce); | ||
| 657 | |||
| 643 | DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, | 658 | DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, |
| 644 | doc: /* List of symbols whose values are abbrev tables. */); | 659 | doc: /* List of symbols whose values are abbrev tables. */); |
| 645 | Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"), | 660 | Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"), |
| @@ -664,7 +679,7 @@ for any particular abbrev defined in both. */); | |||
| 664 | 679 | ||
| 665 | DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text, | 680 | DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text, |
| 666 | doc: /* The exact text of the last abbrev expanded. | 681 | doc: /* The exact text of the last abbrev expanded. |
| 667 | nil if the abbrev has already been unexpanded. */); | 682 | A value of nil means the abbrev has already been unexpanded. */); |
| 668 | 683 | ||
| 669 | DEFVAR_INT ("last-abbrev-location", &last_abbrev_point, | 684 | DEFVAR_INT ("last-abbrev-location", &last_abbrev_point, |
| 670 | doc: /* The location of the start of the last abbrev expanded. */); | 685 | doc: /* The location of the start of the last abbrev expanded. */); |
diff --git a/src/buffer.c b/src/buffer.c index 05555913c59..50203f1d25d 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1344,15 +1344,16 @@ See `kill-buffer'." | |||
| 1344 | */ | 1344 | */ |
| 1345 | DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 1, 1, "bKill buffer: ", | 1345 | DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 1, 1, "bKill buffer: ", |
| 1346 | doc: /* Kill the buffer BUFFER. | 1346 | doc: /* Kill the buffer BUFFER. |
| 1347 | The argument may be a buffer or may be the name of a buffer. | 1347 | The argument may be a buffer or the name of a buffer. |
| 1348 | An argument of nil means kill the current buffer. | 1348 | With a nil argument, kill the current buffer. |
| 1349 | 1349 | ||
| 1350 | Value is t if the buffer is actually killed, nil if user says no. | 1350 | Value is t if the buffer is actually killed, nil otherwise. |
| 1351 | 1351 | ||
| 1352 | The value of `kill-buffer-hook' (which may be local to that buffer), | 1352 | The functions in `kill-buffer-query-functions' are called with BUFFER as |
| 1353 | if not void, is a list of functions to be called, with no arguments, | 1353 | the current buffer. If any of them returns nil, the buffer is not killed. |
| 1354 | before the buffer is actually killed. The buffer to be killed is current | 1354 | |
| 1355 | when the hook functions are called. | 1355 | The hook `kill-buffer-hook' is run before the buffer is actually killed. |
| 1356 | The buffer being killed will be current while the hook is running. | ||
| 1356 | 1357 | ||
| 1357 | Any processes that have this buffer as the `process-buffer' are killed | 1358 | Any processes that have this buffer as the `process-buffer' are killed |
| 1358 | with SIGHUP. */) | 1359 | with SIGHUP. */) |
| @@ -5385,8 +5386,8 @@ This is the same as (default-value 'fill-column). */); | |||
| 5385 | This is the same as (default-value 'left-margin). */); | 5386 | This is the same as (default-value 'left-margin). */); |
| 5386 | 5387 | ||
| 5387 | DEFVAR_LISP_NOPRO ("default-tab-width", | 5388 | DEFVAR_LISP_NOPRO ("default-tab-width", |
| 5388 | &buffer_defaults.tab_width, | 5389 | &buffer_defaults.tab_width, |
| 5389 | doc: /* Default value of `tab-width' for buffers that do not override it. | 5390 | doc: /* Default value of `tab-width' for buffers that do not override it. |
| 5390 | This is the same as (default-value 'tab-width). */); | 5391 | This is the same as (default-value 'tab-width). */); |
| 5391 | 5392 | ||
| 5392 | DEFVAR_LISP_NOPRO ("default-case-fold-search", | 5393 | DEFVAR_LISP_NOPRO ("default-case-fold-search", |
| @@ -5461,13 +5462,13 @@ This is the same as (default-value 'fringe-cursor-alist'). */); | |||
| 5461 | &buffer_defaults.scroll_up_aggressively, | 5462 | &buffer_defaults.scroll_up_aggressively, |
| 5462 | doc: /* Default value of `scroll-up-aggressively'. | 5463 | doc: /* Default value of `scroll-up-aggressively'. |
| 5463 | This value applies in buffers that don't have their own local values. | 5464 | This value applies in buffers that don't have their own local values. |
| 5464 | This variable is an alias for (default-value 'scroll-up-aggressively). */); | 5465 | This is the same as (default-value 'scroll-up-aggressively). */); |
| 5465 | 5466 | ||
| 5466 | DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", | 5467 | DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", |
| 5467 | &buffer_defaults.scroll_down_aggressively, | 5468 | &buffer_defaults.scroll_down_aggressively, |
| 5468 | doc: /* Default value of `scroll-down-aggressively'. | 5469 | doc: /* Default value of `scroll-down-aggressively'. |
| 5469 | This value applies in buffers that don't have their own local values. | 5470 | This value applies in buffers that don't have their own local values. |
| 5470 | This variable is an alias for (default-value 'scroll-down-aggressively). */); | 5471 | This is the same as (default-value 'scroll-down-aggressively). */); |
| 5471 | 5472 | ||
| 5472 | DEFVAR_PER_BUFFER ("header-line-format", | 5473 | DEFVAR_PER_BUFFER ("header-line-format", |
| 5473 | ¤t_buffer->header_line_format, | 5474 | ¤t_buffer->header_line_format, |
| @@ -5530,8 +5531,8 @@ Decimal digits after the % specify field width to which to pad. */); | |||
| 5530 | 5531 | ||
| 5531 | DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, | 5532 | DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, |
| 5532 | doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. | 5533 | doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. |
| 5533 | nil here means use current buffer's major mode, provided it is not | 5534 | A value of nil means use current buffer's major mode, |
| 5534 | marked as "special". | 5535 | provided it is not marked as "special". |
| 5535 | 5536 | ||
| 5536 | When a mode is used by default, `find-file' switches to it | 5537 | When a mode is used by default, `find-file' switches to it |
| 5537 | before it reads the contents into the buffer and before | 5538 | before it reads the contents into the buffer and before |
| @@ -5561,7 +5562,7 @@ Interactively, you can set the buffer local value using \\[set-fill-column]. */ | |||
| 5561 | 5562 | ||
| 5562 | DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, | 5563 | DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, |
| 5563 | make_number (Lisp_Int), | 5564 | make_number (Lisp_Int), |
| 5564 | doc: /* *Column for the default indent-line-function to indent to. | 5565 | doc: /* *Column for the default `indent-line-function' to indent to. |
| 5565 | Linefeed indents to this column in Fundamental mode. */); | 5566 | Linefeed indents to this column in Fundamental mode. */); |
| 5566 | 5567 | ||
| 5567 | DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width, | 5568 | DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width, |
| @@ -5708,9 +5709,9 @@ primitives `aref' and `aset' can be used to access elements of a char-table. | |||
| 5708 | Each of the char-table elements control how to display the corresponding | 5709 | Each of the char-table elements control how to display the corresponding |
| 5709 | text character: the element at index C in the table says how to display | 5710 | text character: the element at index C in the table says how to display |
| 5710 | the character whose code is C. Each element should be a vector of | 5711 | the character whose code is C. Each element should be a vector of |
| 5711 | characters or nil. nil means display the character in the default fashion; | 5712 | characters or nil. The value nil means display the character in the |
| 5712 | otherwise, the characters from the vector are delivered to the screen | 5713 | default fashion; otherwise, the characters from the vector are delivered |
| 5713 | instead of the original character. | 5714 | to the screen instead of the original character. |
| 5714 | 5715 | ||
| 5715 | For example, (aset buffer-display-table ?X ?Y) will cause Emacs to display | 5716 | For example, (aset buffer-display-table ?X ?Y) will cause Emacs to display |
| 5716 | a capital Y instead of each X character. | 5717 | a capital Y instead of each X character. |
| @@ -5841,7 +5842,7 @@ cursor type. */); | |||
| 5841 | ¤t_buffer->scroll_up_aggressively, Qnil, | 5842 | ¤t_buffer->scroll_up_aggressively, Qnil, |
| 5842 | doc: /* How far to scroll windows upward. | 5843 | doc: /* How far to scroll windows upward. |
| 5843 | If you move point off the bottom, the window scrolls automatically. | 5844 | If you move point off the bottom, the window scrolls automatically. |
| 5844 | This variable controls how far it scrolls. nil, the default, | 5845 | This variable controls how far it scrolls. The value nil, the default, |
| 5845 | means scroll to center point. A fraction means scroll to put point | 5846 | means scroll to center point. A fraction means scroll to put point |
| 5846 | that fraction of the window's height from the bottom of the window. | 5847 | that fraction of the window's height from the bottom of the window. |
| 5847 | When the value is 0.0, point goes at the bottom line, which in the simple | 5848 | When the value is 0.0, point goes at the bottom line, which in the simple |
| @@ -5854,7 +5855,7 @@ between 0.0 and 1.0, inclusive. */); | |||
| 5854 | ¤t_buffer->scroll_down_aggressively, Qnil, | 5855 | ¤t_buffer->scroll_down_aggressively, Qnil, |
| 5855 | doc: /* How far to scroll windows downward. | 5856 | doc: /* How far to scroll windows downward. |
| 5856 | If you move point off the top, the window scrolls automatically. | 5857 | If you move point off the top, the window scrolls automatically. |
| 5857 | This variable controls how far it scrolls. nil, the default, | 5858 | This variable controls how far it scrolls. The value nil, the default, |
| 5858 | means scroll to center point. A fraction means scroll to put point | 5859 | means scroll to center point. A fraction means scroll to put point |
| 5859 | that fraction of the window's height from the top of the window. | 5860 | that fraction of the window's height from the top of the window. |
| 5860 | When the value is 0.0, point goes at the top line, which in the simple | 5861 | When the value is 0.0, point goes at the top line, which in the simple |
| @@ -6045,7 +6046,7 @@ is a member of the list. */); | |||
| 6045 | Vinhibit_read_only = Qnil; | 6046 | Vinhibit_read_only = Qnil; |
| 6046 | 6047 | ||
| 6047 | DEFVAR_PER_BUFFER ("cursor-type", ¤t_buffer->cursor_type, Qnil, | 6048 | DEFVAR_PER_BUFFER ("cursor-type", ¤t_buffer->cursor_type, Qnil, |
| 6048 | doc: /* Cursor to use when this buffer is in the selected window. | 6049 | doc: /* Cursor to use when this buffer is in the selected window. |
| 6049 | Values are interpreted as follows: | 6050 | Values are interpreted as follows: |
| 6050 | 6051 | ||
| 6051 | t use the cursor specified for the frame | 6052 | t use the cursor specified for the frame |
| @@ -6066,15 +6067,17 @@ this variable has no effect; the cursor appears as a hollow box. */); | |||
| 6066 | doc: /* Additional space to put between lines when displaying a buffer. | 6067 | doc: /* Additional space to put between lines when displaying a buffer. |
| 6067 | The space is measured in pixels, and put below lines on window systems. | 6068 | The space is measured in pixels, and put below lines on window systems. |
| 6068 | If value is a floating point number, it specifies the spacing relative | 6069 | If value is a floating point number, it specifies the spacing relative |
| 6069 | to the default frame line height. nil means add no extra space. */); | 6070 | to the default frame line height. A value of nil means add no extra space. */); |
| 6070 | 6071 | ||
| 6071 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", | 6072 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", |
| 6072 | ¤t_buffer->cursor_in_non_selected_windows, Qnil, | 6073 | ¤t_buffer->cursor_in_non_selected_windows, Qnil, |
| 6073 | doc: /* *Cursor type to display in non-selected windows. | 6074 | doc: /* *Cursor type to display in non-selected windows. |
| 6074 | t means to use hollow box cursor. See `cursor-type' for other values. */); | 6075 | The value t means to use hollow box cursor. See `cursor-type' for other values. */); |
| 6075 | 6076 | ||
| 6076 | DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, | 6077 | DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, |
| 6077 | doc: /* List of functions called with no args to query before killing a buffer. */); | 6078 | doc: /* List of functions called with no args to query before killing a buffer. |
| 6079 | The buffer being killed will be current while the functions are running. | ||
| 6080 | If any of them returns nil, the buffer is not killed. */); | ||
| 6078 | Vkill_buffer_query_functions = Qnil; | 6081 | Vkill_buffer_query_functions = Qnil; |
| 6079 | 6082 | ||
| 6080 | DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, | 6083 | DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, |
diff --git a/src/callint.c b/src/callint.c index 0bd2ed66383..8f118de5a59 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -60,7 +60,7 @@ static Lisp_Object point_marker; | |||
| 60 | 60 | ||
| 61 | /* String for the prompt text used in Fcall_interactively. */ | 61 | /* String for the prompt text used in Fcall_interactively. */ |
| 62 | static Lisp_Object callint_message; | 62 | static Lisp_Object callint_message; |
| 63 | 63 | ||
| 64 | /* ARGSUSED */ | 64 | /* ARGSUSED */ |
| 65 | DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0, | 65 | DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0, |
| 66 | doc: /* Specify a way of parsing arguments for interactive use of a function. | 66 | doc: /* Specify a way of parsing arguments for interactive use of a function. |
| @@ -102,7 +102,7 @@ K -- Key sequence to be redefined (do not downcase the last event). | |||
| 102 | m -- Value of mark as number. Does not do I/O. | 102 | m -- Value of mark as number. Does not do I/O. |
| 103 | M -- Any string. Inherits the current input method. | 103 | M -- Any string. Inherits the current input method. |
| 104 | n -- Number read using minibuffer. | 104 | n -- Number read using minibuffer. |
| 105 | N -- Raw prefix arg, or if none, do like code `n'. | 105 | N -- Numeric prefix arg, or if none, do like code `n'. |
| 106 | p -- Prefix arg converted to number. Does not do I/O. | 106 | p -- Prefix arg converted to number. Does not do I/O. |
| 107 | P -- Prefix arg in raw form. Does not do I/O. | 107 | P -- Prefix arg in raw form. Does not do I/O. |
| 108 | r -- Region: point and mark as 2 numeric args, smallest first. Does no I/O. | 108 | r -- Region: point and mark as 2 numeric args, smallest first. Does no I/O. |
| @@ -688,7 +688,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 688 | Qnil, Qnil, Qnil, Qt); | 688 | Qnil, Qnil, Qnil, Qt); |
| 689 | break; | 689 | break; |
| 690 | 690 | ||
| 691 | case 'N': /* Prefix arg, else number from minibuffer */ | 691 | case 'N': /* Prefix arg as number, else number from minibuffer */ |
| 692 | if (!NILP (prefix_arg)) | 692 | if (!NILP (prefix_arg)) |
| 693 | goto have_prefix_arg; | 693 | goto have_prefix_arg; |
| 694 | case 'n': /* Read number from minibuffer. */ | 694 | case 'n': /* Read number from minibuffer. */ |
diff --git a/src/callproc.c b/src/callproc.c index 2f0e569d0c8..bc9c8d67d11 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1754,7 +1754,8 @@ syms_of_callproc () | |||
| 1754 | 1754 | ||
| 1755 | DEFVAR_LISP ("shell-file-name", &Vshell_file_name, | 1755 | DEFVAR_LISP ("shell-file-name", &Vshell_file_name, |
| 1756 | doc: /* *File name to load inferior shells from. | 1756 | doc: /* *File name to load inferior shells from. |
| 1757 | Initialized from the SHELL environment variable. */); | 1757 | Initialized from the SHELL environment variable, or to a system-dependent |
| 1758 | default if SHELL is not set. */); | ||
| 1758 | 1759 | ||
| 1759 | DEFVAR_LISP ("exec-path", &Vexec_path, | 1760 | DEFVAR_LISP ("exec-path", &Vexec_path, |
| 1760 | doc: /* *List of directories to search programs to run in subprocesses. | 1761 | doc: /* *List of directories to search programs to run in subprocesses. |
diff --git a/src/category.c b/src/category.c index d7178055b27..ce238f4d399 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* GNU Emacs routines to deal with category tables. | 1 | /* GNU Emacs routines to deal with category tables. |
| 2 | Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. | 2 | Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 3 | Copyright (C) 1995, 1997, 1998, 1999 | 3 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006 | ||
| 4 | National Institute of Advanced Industrial Science and Technology (AIST) | 5 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 5 | Registration Number H14PRO021 | 6 | Registration Number H14PRO021 |
| 6 | 7 | ||
diff --git a/src/category.h b/src/category.h index 413505ece61..e27f86f9a91 100644 --- a/src/category.h +++ b/src/category.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Declarations having to do with Emacs category tables. | 1 | /* Declarations having to do with Emacs category tables. |
| 2 | Copyright (C) 1995, 1998, 1999 | 2 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 3 | 2005, 2006 | ||
| 3 | National Institute of Advanced Industrial Science and Technology (AIST) | 4 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 4 | Registration Number H14PRO021 | 5 | Registration Number H14PRO021 |
| 5 | 6 | ||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* CCL (Code Conversion Language) interpreter. | 1 | /* CCL (Code Conversion Language) interpreter. |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Header for CCL (Code Conversion Language) interpreter. | 1 | /* Header for CCL (Code Conversion Language) interpreter. |
| 2 | Copyright (C) 1995, 1998, 2000 | 2 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 3 | 2005, 2006 | ||
| 3 | National Institute of Advanced Industrial Science and Technology (AIST) | 4 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 4 | Registration Number H14PRO021 | 5 | Registration Number H14PRO021 |
| 5 | 6 | ||
diff --git a/src/charset.c b/src/charset.c index 211de24ef89..535022c6797 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Basic multilingual character support. | 1 | /* Basic multilingual character support. |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
diff --git a/src/charset.h b/src/charset.h index b25a2ffa85a..645bdafe4b2 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Header for multibyte character handler. | 1 | /* Header for multibyte character handler. |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 1998, 2003 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
diff --git a/src/coding.c b/src/coding.c index 53661fc33cc..f3008af526f 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Coding system handler (conversion, detection, and etc). | 1 | /* Coding system handler (conversion, detection, and etc). |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 1998, 2002, 2003, 2004, 2005 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
diff --git a/src/coding.h b/src/coding.h index 81dcb7f08ad..c56cd04a226 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Header for coding system handler. | 1 | /* Header for coding system handler. |
| 2 | Copyright (C) 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 1998, 2000 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
diff --git a/src/composite.c b/src/composite.c index d3be3554c55..8e5fce2da96 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Composite sequence support. | 1 | /* Composite sequence support. |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1999 | 4 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 5 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 6 | Registration Number H14PRO021 |
| 7 | 7 | ||
diff --git a/src/composite.h b/src/composite.h index 5c19f8aa56e..e19fcd99e73 100644 --- a/src/composite.h +++ b/src/composite.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Header for composite sequence handler. | 1 | /* Header for composite sequence handler. |
| 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 2001, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1997 | 4 | Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 5 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 6 | Registration Number H14PRO021 |
| 7 | 7 | ||
diff --git a/src/config.in b/src/config.in index 21052474ec6..f0ebbc76218 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* src/config.in. Generated from configure.in by autoheader. */ | 1 | /* src/config.in. Generated from configure.in by autoheader. */ |
| 2 | 2 | ||
| 3 | /* GNU Emacs site configuration template file. | 3 | /* GNU Emacs site configuration template file. |
| 4 | Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004, 2005, 2006 | 4 | Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006 |
| 5 | Free Software Foundation, Inc. | 5 | Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | This file is part of GNU Emacs. | 7 | This file is part of GNU Emacs. |
| @@ -121,6 +121,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 121 | don't. */ | 121 | don't. */ |
| 122 | #undef HAVE_DECL_SYS_SIGLIST | 122 | #undef HAVE_DECL_SYS_SIGLIST |
| 123 | 123 | ||
| 124 | /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. | ||
| 125 | */ | ||
| 126 | #undef HAVE_DECL_TZNAME | ||
| 127 | |||
| 124 | /* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you | 128 | /* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you |
| 125 | don't. */ | 129 | don't. */ |
| 126 | #undef HAVE_DECL___SYS_SIGLIST | 130 | #undef HAVE_DECL___SYS_SIGLIST |
| @@ -245,6 +249,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 245 | /* Define to 1 if you have the `gtk_file_selection_new' function. */ | 249 | /* Define to 1 if you have the `gtk_file_selection_new' function. */ |
| 246 | #undef HAVE_GTK_FILE_SELECTION_NEW | 250 | #undef HAVE_GTK_FILE_SELECTION_NEW |
| 247 | 251 | ||
| 252 | /* Define to 1 if you have the `gtk_main' function. */ | ||
| 253 | #undef HAVE_GTK_MAIN | ||
| 254 | |||
| 248 | /* Define to 1 if GTK can handle more than one display. */ | 255 | /* Define to 1 if GTK can handle more than one display. */ |
| 249 | #undef HAVE_GTK_MULTIDISPLAY | 256 | #undef HAVE_GTK_MULTIDISPLAY |
| 250 | 257 | ||
| @@ -571,6 +578,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 571 | /* Define to 1 if `struct utimbuf' is declared by <utime.h>. */ | 578 | /* Define to 1 if `struct utimbuf' is declared by <utime.h>. */ |
| 572 | #undef HAVE_STRUCT_UTIMBUF | 579 | #undef HAVE_STRUCT_UTIMBUF |
| 573 | 580 | ||
| 581 | /* Define to 1 if you have the `sync' function. */ | ||
| 582 | #undef HAVE_SYNC | ||
| 583 | |||
| 574 | /* Define to 1 if you have the `sysinfo' function. */ | 584 | /* Define to 1 if you have the `sysinfo' function. */ |
| 575 | #undef HAVE_SYSINFO | 585 | #undef HAVE_SYSINFO |
| 576 | 586 | ||
| @@ -796,7 +806,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 796 | 806 | ||
| 797 | /* If using the C implementation of alloca, define if you know the | 807 | /* If using the C implementation of alloca, define if you know the |
| 798 | direction of stack growth for your system; otherwise it will be | 808 | direction of stack growth for your system; otherwise it will be |
| 799 | automatically deduced at run-time. | 809 | automatically deduced at runtime. |
| 800 | STACK_DIRECTION > 0 => grows toward higher addresses | 810 | STACK_DIRECTION > 0 => grows toward higher addresses |
| 801 | STACK_DIRECTION < 0 => grows toward lower addresses | 811 | STACK_DIRECTION < 0 => grows toward lower addresses |
| 802 | STACK_DIRECTION = 0 => direction of growth unknown */ | 812 | STACK_DIRECTION = 0 => direction of growth unknown */ |
diff --git a/src/data.c b/src/data.c index cc0f96793ca..dc9095c033c 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1276,7 +1276,7 @@ set_internal (symbol, newval, buf, bindflag) | |||
| 1276 | XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, | 1276 | XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, |
| 1277 | tem1); | 1277 | tem1); |
| 1278 | 1278 | ||
| 1279 | /* Set `buffer' and `frame' slots for thebinding now loaded. */ | 1279 | /* Set `buffer' and `frame' slots for the binding now loaded. */ |
| 1280 | XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, buf); | 1280 | XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, buf); |
| 1281 | XBUFFER_LOCAL_VALUE (valcontents)->frame = selected_frame; | 1281 | XBUFFER_LOCAL_VALUE (valcontents)->frame = selected_frame; |
| 1282 | } | 1282 | } |
diff --git a/src/dired.c b/src/dired.c index b469d682c41..ffaeb5adee4 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -395,17 +395,20 @@ ID-FORMAT specifies the preferred format of attributes uid and gid, see | |||
| 395 | Lisp_Object file_name_completion (); | 395 | Lisp_Object file_name_completion (); |
| 396 | 396 | ||
| 397 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, | 397 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, |
| 398 | 2, 2, 0, | 398 | 2, 3, 0, |
| 399 | doc: /* Complete file name FILE in directory DIRECTORY. | 399 | doc: /* Complete file name FILE in directory DIRECTORY. |
| 400 | Returns the longest string | 400 | Returns the longest string |
| 401 | common to all file names in DIRECTORY that start with FILE. | 401 | common to all file names in DIRECTORY that start with FILE. |
| 402 | If there is only one and FILE matches it exactly, returns t. | 402 | If there is only one and FILE matches it exactly, returns t. |
| 403 | Returns nil if DIRECTORY contains no name starting with FILE. | 403 | Returns nil if DIRECTORY contains no name starting with FILE. |
| 404 | 404 | ||
| 405 | If PREDICATE is non-nil, call PREDICATE with each possible | ||
| 406 | completion (in absolute form) and ignore it if PREDICATE returns nil. | ||
| 407 | |||
| 405 | This function ignores some of the possible completions as | 408 | This function ignores some of the possible completions as |
| 406 | determined by the variable `completion-ignored-extensions', which see. */) | 409 | determined by the variable `completion-ignored-extensions', which see. */) |
| 407 | (file, directory) | 410 | (file, directory, predicate) |
| 408 | Lisp_Object file, directory; | 411 | Lisp_Object file, directory, predicate; |
| 409 | { | 412 | { |
| 410 | Lisp_Object handler; | 413 | Lisp_Object handler; |
| 411 | 414 | ||
| @@ -413,15 +416,15 @@ determined by the variable `completion-ignored-extensions', which see. */) | |||
| 413 | call the corresponding file handler. */ | 416 | call the corresponding file handler. */ |
| 414 | handler = Ffind_file_name_handler (directory, Qfile_name_completion); | 417 | handler = Ffind_file_name_handler (directory, Qfile_name_completion); |
| 415 | if (!NILP (handler)) | 418 | if (!NILP (handler)) |
| 416 | return call3 (handler, Qfile_name_completion, file, directory); | 419 | return call4 (handler, Qfile_name_completion, file, directory, predicate); |
| 417 | 420 | ||
| 418 | /* If the file name has special constructs in it, | 421 | /* If the file name has special constructs in it, |
| 419 | call the corresponding file handler. */ | 422 | call the corresponding file handler. */ |
| 420 | handler = Ffind_file_name_handler (file, Qfile_name_completion); | 423 | handler = Ffind_file_name_handler (file, Qfile_name_completion); |
| 421 | if (!NILP (handler)) | 424 | if (!NILP (handler)) |
| 422 | return call3 (handler, Qfile_name_completion, file, directory); | 425 | return call4 (handler, Qfile_name_completion, file, directory, predicate); |
| 423 | 426 | ||
| 424 | return file_name_completion (file, directory, 0, 0); | 427 | return file_name_completion (file, directory, 0, 0, predicate); |
| 425 | } | 428 | } |
| 426 | 429 | ||
| 427 | DEFUN ("file-name-all-completions", Ffile_name_all_completions, | 430 | DEFUN ("file-name-all-completions", Ffile_name_all_completions, |
| @@ -445,21 +448,25 @@ These are all file names in directory DIRECTORY which begin with FILE. */) | |||
| 445 | if (!NILP (handler)) | 448 | if (!NILP (handler)) |
| 446 | return call3 (handler, Qfile_name_all_completions, file, directory); | 449 | return call3 (handler, Qfile_name_all_completions, file, directory); |
| 447 | 450 | ||
| 448 | return file_name_completion (file, directory, 1, 0); | 451 | return file_name_completion (file, directory, 1, 0, Qnil); |
| 449 | } | 452 | } |
| 450 | 453 | ||
| 451 | static int file_name_completion_stat (); | 454 | static int file_name_completion_stat (); |
| 452 | 455 | ||
| 453 | Lisp_Object | 456 | Lisp_Object |
| 454 | file_name_completion (file, dirname, all_flag, ver_flag) | 457 | file_name_completion (file, dirname, all_flag, ver_flag, predicate) |
| 455 | Lisp_Object file, dirname; | 458 | Lisp_Object file, dirname; |
| 456 | int all_flag, ver_flag; | 459 | int all_flag, ver_flag; |
| 460 | Lisp_Object predicate; | ||
| 457 | { | 461 | { |
| 458 | DIR *d; | 462 | DIR *d; |
| 459 | int bestmatchsize = 0, skip; | 463 | int bestmatchsize = 0, skip; |
| 460 | register int compare, matchsize; | 464 | register int compare, matchsize; |
| 461 | unsigned char *p1, *p2; | 465 | unsigned char *p1, *p2; |
| 462 | int matchcount = 0; | 466 | int matchcount = 0; |
| 467 | /* If ALL_FLAG is 1, BESTMATCH is the list of all matches, decoded. | ||
| 468 | If ALL_FLAG is 0, BESTMATCH is either nil | ||
| 469 | or the best match so far, not decoded. */ | ||
| 463 | Lisp_Object bestmatch, tem, elt, name; | 470 | Lisp_Object bestmatch, tem, elt, name; |
| 464 | Lisp_Object encoded_file; | 471 | Lisp_Object encoded_file; |
| 465 | Lisp_Object encoded_dir; | 472 | Lisp_Object encoded_dir; |
| @@ -567,8 +574,8 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 567 | #ifndef TRIVIAL_DIRECTORY_ENTRY | 574 | #ifndef TRIVIAL_DIRECTORY_ENTRY |
| 568 | #define TRIVIAL_DIRECTORY_ENTRY(n) (!strcmp (n, ".") || !strcmp (n, "..")) | 575 | #define TRIVIAL_DIRECTORY_ENTRY(n) (!strcmp (n, ".") || !strcmp (n, "..")) |
| 569 | #endif | 576 | #endif |
| 570 | /* "." and ".." are never interesting as completions, but are | 577 | /* "." and ".." are never interesting as completions, and are |
| 571 | actually in the way in a directory contains only one file. */ | 578 | actually in the way in a directory with only one file. */ |
| 572 | if (!passcount && TRIVIAL_DIRECTORY_ENTRY (dp->d_name)) | 579 | if (!passcount && TRIVIAL_DIRECTORY_ENTRY (dp->d_name)) |
| 573 | continue; | 580 | continue; |
| 574 | if (!passcount && len > SCHARS (encoded_file)) | 581 | if (!passcount && len > SCHARS (encoded_file)) |
| @@ -649,30 +656,38 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 649 | continue; | 656 | continue; |
| 650 | } | 657 | } |
| 651 | 658 | ||
| 652 | /* Update computation of how much all possible completions match */ | 659 | /* This is a possible completion */ |
| 660 | if (directoryp) | ||
| 661 | { | ||
| 662 | /* This completion is a directory; make it end with '/' */ | ||
| 663 | name = Ffile_name_as_directory (make_string (dp->d_name, len)); | ||
| 664 | } | ||
| 665 | else | ||
| 666 | name = make_string (dp->d_name, len); | ||
| 667 | |||
| 668 | /* Test the predicate, if any. */ | ||
| 669 | |||
| 670 | if (!NILP (predicate)) | ||
| 671 | { | ||
| 672 | Lisp_Object decoded; | ||
| 673 | decoded = Fexpand_file_name (DECODE_FILE (name), dirname); | ||
| 674 | if (NILP (call1 (predicate, decoded))) | ||
| 675 | continue; | ||
| 676 | } | ||
| 677 | |||
| 678 | /* Suitably record this match. */ | ||
| 653 | 679 | ||
| 654 | matchcount++; | 680 | matchcount++; |
| 655 | 681 | ||
| 656 | if (all_flag || NILP (bestmatch)) | 682 | if (all_flag) |
| 657 | { | 683 | { |
| 658 | /* This is a possible completion */ | 684 | name = DECODE_FILE (name); |
| 659 | if (directoryp) | 685 | bestmatch = Fcons (name, bestmatch); |
| 660 | { | 686 | } |
| 661 | /* This completion is a directory; make it end with '/' */ | 687 | else if (NILP (bestmatch)) |
| 662 | name = Ffile_name_as_directory (make_string (dp->d_name, len)); | 688 | { |
| 663 | } | 689 | bestmatch = name; |
| 664 | else | 690 | bestmatchsize = SCHARS (name); |
| 665 | name = make_string (dp->d_name, len); | ||
| 666 | if (all_flag) | ||
| 667 | { | ||
| 668 | name = DECODE_FILE (name); | ||
| 669 | bestmatch = Fcons (name, bestmatch); | ||
| 670 | } | ||
| 671 | else | ||
| 672 | { | ||
| 673 | bestmatch = name; | ||
| 674 | bestmatchsize = SCHARS (name); | ||
| 675 | } | ||
| 676 | } | 691 | } |
| 677 | else | 692 | else |
| 678 | { | 693 | { |
| @@ -708,11 +723,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 708 | == SCHARS (bestmatch))) | 723 | == SCHARS (bestmatch))) |
| 709 | && !bcmp (p2, SDATA (encoded_file), SCHARS (encoded_file)) | 724 | && !bcmp (p2, SDATA (encoded_file), SCHARS (encoded_file)) |
| 710 | && bcmp (p1, SDATA (encoded_file), SCHARS (encoded_file)))) | 725 | && bcmp (p1, SDATA (encoded_file), SCHARS (encoded_file)))) |
| 711 | { | 726 | bestmatch = name; |
| 712 | bestmatch = make_string (dp->d_name, len); | ||
| 713 | if (directoryp) | ||
| 714 | bestmatch = Ffile_name_as_directory (bestmatch); | ||
| 715 | } | ||
| 716 | } | 727 | } |
| 717 | 728 | ||
| 718 | /* If this dirname all matches, see if implicit following | 729 | /* If this dirname all matches, see if implicit following |
| @@ -835,7 +846,7 @@ DEFUN ("file-name-all-versions", Ffile_name_all_versions, | |||
| 835 | (file, directory) | 846 | (file, directory) |
| 836 | Lisp_Object file, directory; | 847 | Lisp_Object file, directory; |
| 837 | { | 848 | { |
| 838 | return file_name_completion (file, directory, 1, 1); | 849 | return file_name_completion (file, directory, 1, 1, Qnil); |
| 839 | } | 850 | } |
| 840 | 851 | ||
| 841 | DEFUN ("file-version-limit", Ffile_version_limit, Sfile_version_limit, 1, 1, 0, | 852 | DEFUN ("file-version-limit", Ffile_version_limit, Sfile_version_limit, 1, 1, 0, |
diff --git a/src/emacs.c b/src/emacs.c index 76ad59c78d1..8ffab8f0d3d 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -304,7 +304,7 @@ Display options:\n\ | |||
| 304 | used for debugging Emacs\n\ | 304 | used for debugging Emacs\n\ |
| 305 | --border-color, -bd COLOR main border color\n\ | 305 | --border-color, -bd COLOR main border color\n\ |
| 306 | --border-width, -bw WIDTH width of main border\n\ | 306 | --border-width, -bw WIDTH width of main border\n\ |
| 307 | --color, --color=MODE color mode for character terminals;\n\ | 307 | --color, --color=MODE override color mode for character terminals;\n\ |
| 308 | MODE defaults to `auto', and can also\n\ | 308 | MODE defaults to `auto', and can also\n\ |
| 309 | be `never', `auto', `always',\n\ | 309 | be `never', `auto', `always',\n\ |
| 310 | or a mode name like `ansi8'\n\ | 310 | or a mode name like `ansi8'\n\ |
| @@ -362,39 +362,6 @@ pthread_t main_thread; | |||
| 362 | #endif | 362 | #endif |
| 363 | 363 | ||
| 364 | 364 | ||
| 365 | #ifdef SIGUSR1 | ||
| 366 | SIGTYPE | ||
| 367 | handle_USR1_signal (sig) | ||
| 368 | int sig; | ||
| 369 | { | ||
| 370 | struct input_event buf; | ||
| 371 | |||
| 372 | SIGNAL_THREAD_CHECK (sig); | ||
| 373 | bzero (&buf, sizeof buf); | ||
| 374 | buf.kind = USER_SIGNAL_EVENT; | ||
| 375 | buf.frame_or_window = selected_frame; | ||
| 376 | |||
| 377 | kbd_buffer_store_event (&buf); | ||
| 378 | } | ||
| 379 | #endif /* SIGUSR1 */ | ||
| 380 | |||
| 381 | #ifdef SIGUSR2 | ||
| 382 | SIGTYPE | ||
| 383 | handle_USR2_signal (sig) | ||
| 384 | int sig; | ||
| 385 | { | ||
| 386 | struct input_event buf; | ||
| 387 | |||
| 388 | SIGNAL_THREAD_CHECK (sig); | ||
| 389 | bzero (&buf, sizeof buf); | ||
| 390 | buf.kind = USER_SIGNAL_EVENT; | ||
| 391 | buf.code = 1; | ||
| 392 | buf.frame_or_window = selected_frame; | ||
| 393 | |||
| 394 | kbd_buffer_store_event (&buf); | ||
| 395 | } | ||
| 396 | #endif /* SIGUSR2 */ | ||
| 397 | |||
| 398 | /* Handle bus errors, invalid instruction, etc. */ | 365 | /* Handle bus errors, invalid instruction, etc. */ |
| 399 | SIGTYPE | 366 | SIGTYPE |
| 400 | fatal_error_signal (sig) | 367 | fatal_error_signal (sig) |
| @@ -1227,10 +1194,10 @@ main (argc, argv | |||
| 1227 | signal (SIGILL, fatal_error_signal); | 1194 | signal (SIGILL, fatal_error_signal); |
| 1228 | signal (SIGTRAP, fatal_error_signal); | 1195 | signal (SIGTRAP, fatal_error_signal); |
| 1229 | #ifdef SIGUSR1 | 1196 | #ifdef SIGUSR1 |
| 1230 | signal (SIGUSR1, handle_USR1_signal); | 1197 | add_user_signal (SIGUSR1, "sigusr1"); |
| 1231 | #ifdef SIGUSR2 | ||
| 1232 | signal (SIGUSR2, handle_USR2_signal); | ||
| 1233 | #endif | 1198 | #endif |
| 1199 | #ifdef SIGUSR2 | ||
| 1200 | add_user_signal (SIGUSR2, "sigusr2"); | ||
| 1234 | #endif | 1201 | #endif |
| 1235 | #ifdef SIGABRT | 1202 | #ifdef SIGABRT |
| 1236 | signal (SIGABRT, fatal_error_signal); | 1203 | signal (SIGABRT, fatal_error_signal); |
| @@ -2475,7 +2442,8 @@ Special values: | |||
| 2475 | `ms-dos' compiled as an MS-DOS application. | 2442 | `ms-dos' compiled as an MS-DOS application. |
| 2476 | `windows-nt' compiled as a native W32 application. | 2443 | `windows-nt' compiled as a native W32 application. |
| 2477 | `cygwin' compiled using the Cygwin library. | 2444 | `cygwin' compiled using the Cygwin library. |
| 2478 | `vax-vms' or `axp-vms': compiled for a (Open)VMS system. | 2445 | `vax-vms' or |
| 2446 | `axp-vms' compiled for a (Open)VMS system. | ||
| 2479 | Anything else indicates some sort of Unix system. */); | 2447 | Anything else indicates some sort of Unix system. */); |
| 2480 | Vsystem_type = intern (SYSTEM_TYPE); | 2448 | Vsystem_type = intern (SYSTEM_TYPE); |
| 2481 | 2449 | ||
diff --git a/src/fileio.c b/src/fileio.c index e6a4314e543..f41699bcc46 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3543,11 +3543,7 @@ Use the current time if TIME is nil. TIME is in the format of | |||
| 3543 | return Qt; | 3543 | return Qt; |
| 3544 | } | 3544 | } |
| 3545 | 3545 | ||
| 3546 | #ifdef __NetBSD__ | 3546 | #ifdef HAVE_SYNC |
| 3547 | #define unix 42 | ||
| 3548 | #endif | ||
| 3549 | |||
| 3550 | #ifdef unix | ||
| 3551 | DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", | 3547 | DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", |
| 3552 | doc: /* Tell Unix to finish all pending disk updates. */) | 3548 | doc: /* Tell Unix to finish all pending disk updates. */) |
| 3553 | () | 3549 | () |
| @@ -3556,7 +3552,7 @@ DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", | |||
| 3556 | return Qnil; | 3552 | return Qnil; |
| 3557 | } | 3553 | } |
| 3558 | 3554 | ||
| 3559 | #endif /* unix */ | 3555 | #endif /* HAVE_SYNC */ |
| 3560 | 3556 | ||
| 3561 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, | 3557 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, |
| 3562 | doc: /* Return t if file FILE1 is newer than file FILE2. | 3558 | doc: /* Return t if file FILE1 is newer than file FILE2. |
| @@ -6165,7 +6161,7 @@ DEFUN ("read-file-name-internal", Fread_file_name_internal, Sread_file_name_inte | |||
| 6165 | if (NILP (action)) | 6161 | if (NILP (action)) |
| 6166 | { | 6162 | { |
| 6167 | specdir = Ffile_name_directory (string); | 6163 | specdir = Ffile_name_directory (string); |
| 6168 | val = Ffile_name_completion (name, realdir); | 6164 | val = Ffile_name_completion (name, realdir, Vread_file_name_predicate); |
| 6169 | UNGCPRO; | 6165 | UNGCPRO; |
| 6170 | if (!STRINGP (val)) | 6166 | if (!STRINGP (val)) |
| 6171 | { | 6167 | { |
| @@ -6795,7 +6791,7 @@ A non-nil value may result in data loss! */); | |||
| 6795 | defsubr (&Sread_file_name); | 6791 | defsubr (&Sread_file_name); |
| 6796 | defsubr (&Snext_read_file_uses_dialog_p); | 6792 | defsubr (&Snext_read_file_uses_dialog_p); |
| 6797 | 6793 | ||
| 6798 | #ifdef unix | 6794 | #ifdef HAVE_SYNC |
| 6799 | defsubr (&Sunix_sync); | 6795 | defsubr (&Sunix_sync); |
| 6800 | #endif | 6796 | #endif |
| 6801 | } | 6797 | } |
diff --git a/src/fontset.c b/src/fontset.c index 47cda7f8601..66a31e9acf0 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Fontset handler. | 1 | /* Fontset handler. |
| 2 | Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 2 | Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 3 | Copyright (C) 1995, 1997, 1998, 2000, 2003, 2004, 2005 | 3 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006 | ||
| 4 | National Institute of Advanced Industrial Science and Technology (AIST) | 5 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 5 | Registration Number H14PRO021 | 6 | Registration Number H14PRO021 |
| 6 | 7 | ||
diff --git a/src/fontset.h b/src/fontset.h index a4360280911..a08f7b74bd0 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* Header for fontset handler. | 1 | /* Header for fontset handler. |
| 2 | Copyright (C) 1998, 2002, 2003, 2004, 2005, | 2 | Copyright (C) 1998, 2002, 2003, 2004, 2005, |
| 3 | 2006 Free Software Foundation, Inc. | 3 | 2006 Free Software Foundation, Inc. |
| 4 | Copyright (C) 1995, 1997, 2000 | 4 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 5 | 2005, 2006 | ||
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 6 | National Institute of Advanced Industrial Science and Technology (AIST) |
| 6 | Registration Number H14PRO021 | 7 | Registration Number H14PRO021 |
| 7 | 8 | ||
diff --git a/src/frame.h b/src/frame.h index 9e3813c844a..9f22d1c08ab 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -456,6 +456,10 @@ struct frame | |||
| 456 | 456 | ||
| 457 | /* Set to non-zero when current redisplay has updated frame. */ | 457 | /* Set to non-zero when current redisplay has updated frame. */ |
| 458 | unsigned updated_p : 1; | 458 | unsigned updated_p : 1; |
| 459 | |||
| 460 | /* Set to non-zero to minimize tool-bar height even when | ||
| 461 | auto-resize-tool-bar is set to grow-only. */ | ||
| 462 | unsigned minimize_tool_bar_window_p : 1; | ||
| 459 | }; | 463 | }; |
| 460 | 464 | ||
| 461 | #ifdef MULTI_KBOARD | 465 | #ifdef MULTI_KBOARD |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 17bf2d20a4c..d136dbe0fce 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -3350,11 +3350,8 @@ xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3350 | get them. */ | 3350 | get them. */ |
| 3351 | #define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier" | 3351 | #define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier" |
| 3352 | 3352 | ||
| 3353 | 3353 | /* The key for storing the button widget in its proxy menu item. */ | |
| 3354 | /* Callback function invoked when a tool bar item is pressed. | 3354 | #define XG_TOOL_BAR_PROXY_BUTTON "emacs-tool-bar-proxy-button" |
| 3355 | W is the button widget in the tool bar that got pressed, | ||
| 3356 | CLIENT_DATA is an integer that is the index of the button in the | ||
| 3357 | tool bar. 0 is the first button. */ | ||
| 3358 | 3355 | ||
| 3359 | static gboolean | 3356 | static gboolean |
| 3360 | xg_tool_bar_button_cb (widget, event, user_data) | 3357 | xg_tool_bar_button_cb (widget, event, user_data) |
| @@ -3364,11 +3361,16 @@ xg_tool_bar_button_cb (widget, event, user_data) | |||
| 3364 | { | 3361 | { |
| 3365 | /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ | 3362 | /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ |
| 3366 | gpointer ptr = (gpointer) (EMACS_INT) event->state; | 3363 | gpointer ptr = (gpointer) (EMACS_INT) event->state; |
| 3367 | g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER, ptr); | 3364 | g_object_set_data (G_OBJECT (widget), XG_TOOL_BAR_LAST_MODIFIER, ptr); |
| 3368 | return FALSE; | 3365 | return FALSE; |
| 3369 | } | 3366 | } |
| 3370 | 3367 | ||
| 3371 | 3368 | ||
| 3369 | /* Callback function invoked when a tool bar item is pressed. | ||
| 3370 | W is the button widget in the tool bar that got pressed, | ||
| 3371 | CLIENT_DATA is an integer that is the index of the button in the | ||
| 3372 | tool bar. 0 is the first button. */ | ||
| 3373 | |||
| 3372 | static void | 3374 | static void |
| 3373 | xg_tool_bar_callback (w, client_data) | 3375 | xg_tool_bar_callback (w, client_data) |
| 3374 | GtkWidget *w; | 3376 | GtkWidget *w; |
| @@ -3406,6 +3408,92 @@ xg_tool_bar_callback (w, client_data) | |||
| 3406 | kbd_buffer_store_event (&event); | 3408 | kbd_buffer_store_event (&event); |
| 3407 | } | 3409 | } |
| 3408 | 3410 | ||
| 3411 | /* Callback function invoked when a tool bar item is pressed in a detached | ||
| 3412 | tool bar or the overflow drop down menu. | ||
| 3413 | We just call xg_tool_bar_callback. | ||
| 3414 | W is the menu item widget that got pressed, | ||
| 3415 | CLIENT_DATA is an integer that is the index of the button in the | ||
| 3416 | tool bar. 0 is the first button. */ | ||
| 3417 | |||
| 3418 | static void | ||
| 3419 | xg_tool_bar_proxy_callback (w, client_data) | ||
| 3420 | GtkWidget *w; | ||
| 3421 | gpointer client_data; | ||
| 3422 | { | ||
| 3423 | GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), | ||
| 3424 | XG_TOOL_BAR_PROXY_BUTTON)); | ||
| 3425 | xg_tool_bar_callback (wbutton, client_data); | ||
| 3426 | } | ||
| 3427 | |||
| 3428 | /* This callback is called when a tool item should create a proxy item, | ||
| 3429 | such as for the overflow menu. Also called when the tool bar is detached. | ||
| 3430 | If we don't create a proxy menu item, the detached tool bar will be | ||
| 3431 | blank. */ | ||
| 3432 | |||
| 3433 | static gboolean | ||
| 3434 | xg_tool_bar_menu_proxy (toolitem, user_data) | ||
| 3435 | GtkToolItem *toolitem; | ||
| 3436 | gpointer user_data; | ||
| 3437 | { | ||
| 3438 | GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (toolitem)); | ||
| 3439 | GtkButton *wbutton = GTK_BUTTON (gtk_bin_get_child (GTK_BIN (weventbox))); | ||
| 3440 | GtkWidget *wmenuitem = gtk_image_menu_item_new (); | ||
| 3441 | GtkWidget *wmenuimage; | ||
| 3442 | |||
| 3443 | if (gtk_button_get_use_stock (wbutton)) | ||
| 3444 | wmenuimage = gtk_image_new_from_stock (gtk_button_get_label (wbutton), | ||
| 3445 | GTK_ICON_SIZE_MENU); | ||
| 3446 | else | ||
| 3447 | { | ||
| 3448 | GtkImage *wimage = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (wbutton))); | ||
| 3449 | GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton)); | ||
| 3450 | GtkImageType store_type = gtk_image_get_storage_type (wimage); | ||
| 3451 | if (store_type == GTK_IMAGE_STOCK) | ||
| 3452 | { | ||
| 3453 | gchar *stock_id; | ||
| 3454 | gtk_image_get_stock (wimage, &stock_id, NULL); | ||
| 3455 | wmenuimage = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); | ||
| 3456 | } | ||
| 3457 | else if (store_type == GTK_IMAGE_ICON_SET) | ||
| 3458 | { | ||
| 3459 | GtkIconSet *icon_set; | ||
| 3460 | gtk_image_get_icon_set (wimage, &icon_set, NULL); | ||
| 3461 | wmenuimage = gtk_image_new_from_icon_set (icon_set, | ||
| 3462 | GTK_ICON_SIZE_MENU); | ||
| 3463 | } | ||
| 3464 | else if (store_type == GTK_IMAGE_PIXBUF) | ||
| 3465 | { | ||
| 3466 | gint width, height; | ||
| 3467 | |||
| 3468 | if (settings && | ||
| 3469 | gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, | ||
| 3470 | &width, &height)) | ||
| 3471 | { | ||
| 3472 | GdkPixbuf *src_pixbuf, *dest_pixbuf; | ||
| 3473 | |||
| 3474 | src_pixbuf = gtk_image_get_pixbuf (wimage); | ||
| 3475 | dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, width, height, | ||
| 3476 | GDK_INTERP_BILINEAR); | ||
| 3477 | |||
| 3478 | wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf); | ||
| 3479 | } | ||
| 3480 | } | ||
| 3481 | } | ||
| 3482 | if (wmenuimage) | ||
| 3483 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (wmenuitem), wmenuimage); | ||
| 3484 | |||
| 3485 | g_signal_connect (G_OBJECT (wmenuitem), | ||
| 3486 | "activate", | ||
| 3487 | GTK_SIGNAL_FUNC (xg_tool_bar_proxy_callback), | ||
| 3488 | user_data); | ||
| 3489 | |||
| 3490 | g_object_set_data (G_OBJECT (wmenuitem), XG_TOOL_BAR_PROXY_BUTTON, | ||
| 3491 | (gpointer) wbutton); | ||
| 3492 | gtk_tool_item_set_proxy_menu_item (toolitem, "Emacs toolbar item", wmenuitem); | ||
| 3493 | |||
| 3494 | return TRUE; | ||
| 3495 | } | ||
| 3496 | |||
| 3409 | /* This callback is called when a tool bar is detached. We must set | 3497 | /* This callback is called when a tool bar is detached. We must set |
| 3410 | the height of the tool bar to zero when this happens so frame sizes | 3498 | the height of the tool bar to zero when this happens so frame sizes |
| 3411 | are correctly calculated. | 3499 | are correctly calculated. |
| @@ -3491,9 +3579,6 @@ xg_tool_bar_help_callback (w, event, client_data) | |||
| 3491 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); | 3579 | FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); |
| 3492 | Lisp_Object help, frame; | 3580 | Lisp_Object help, frame; |
| 3493 | 3581 | ||
| 3494 | if (! GTK_IS_BUTTON (w)) | ||
| 3495 | return FALSE; | ||
| 3496 | |||
| 3497 | if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) | 3582 | if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) |
| 3498 | return FALSE; | 3583 | return FALSE; |
| 3499 | 3584 | ||
| @@ -3631,10 +3716,9 @@ update_frame_tool_bar (f) | |||
| 3631 | { | 3716 | { |
| 3632 | int i; | 3717 | int i; |
| 3633 | GtkRequisition old_req, new_req; | 3718 | GtkRequisition old_req, new_req; |
| 3634 | GList *icon_list; | ||
| 3635 | GList *iter; | ||
| 3636 | struct x_output *x = f->output_data.x; | 3719 | struct x_output *x = f->output_data.x; |
| 3637 | int hmargin, vmargin; | 3720 | int hmargin, vmargin; |
| 3721 | GtkToolItem *ti; | ||
| 3638 | 3722 | ||
| 3639 | if (! FRAME_GTK_WIDGET (f)) | 3723 | if (! FRAME_GTK_WIDGET (f)) |
| 3640 | return; | 3724 | return; |
| @@ -3670,9 +3754,6 @@ update_frame_tool_bar (f) | |||
| 3670 | 3754 | ||
| 3671 | gtk_widget_size_request (x->toolbar_widget, &old_req); | 3755 | gtk_widget_size_request (x->toolbar_widget, &old_req); |
| 3672 | 3756 | ||
| 3673 | icon_list = gtk_container_get_children (GTK_CONTAINER (x->toolbar_widget)); | ||
| 3674 | iter = icon_list; | ||
| 3675 | |||
| 3676 | for (i = 0; i < f->n_tool_bar_items; ++i) | 3757 | for (i = 0; i < f->n_tool_bar_items; ++i) |
| 3677 | { | 3758 | { |
| 3678 | #define PROP(IDX) AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX)) | 3759 | #define PROP(IDX) AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX)) |
| @@ -3683,9 +3764,16 @@ update_frame_tool_bar (f) | |||
| 3683 | int img_id; | 3764 | int img_id; |
| 3684 | struct image *img; | 3765 | struct image *img; |
| 3685 | Lisp_Object image; | 3766 | Lisp_Object image; |
| 3686 | GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0; | 3767 | GtkWidget *wbutton; |
| 3768 | GtkWidget *weventbox; | ||
| 3687 | 3769 | ||
| 3688 | if (iter) iter = g_list_next (iter); | 3770 | ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i); |
| 3771 | |||
| 3772 | if (ti) | ||
| 3773 | { | ||
| 3774 | weventbox = gtk_bin_get_child (GTK_BIN (ti)); | ||
| 3775 | wbutton = gtk_bin_get_child (GTK_BIN (weventbox)); | ||
| 3776 | } | ||
| 3689 | 3777 | ||
| 3690 | /* If image is a vector, choose the image according to the | 3778 | /* If image is a vector, choose the image according to the |
| 3691 | button state. */ | 3779 | button state. */ |
| @@ -3710,7 +3798,7 @@ update_frame_tool_bar (f) | |||
| 3710 | /* Ignore invalid image specifications. */ | 3798 | /* Ignore invalid image specifications. */ |
| 3711 | if (!valid_image_p (image)) | 3799 | if (!valid_image_p (image)) |
| 3712 | { | 3800 | { |
| 3713 | if (wicon) gtk_widget_hide (wicon); | 3801 | if (ti) gtk_widget_hide_all (GTK_WIDGET (ti)); |
| 3714 | continue; | 3802 | continue; |
| 3715 | } | 3803 | } |
| 3716 | 3804 | ||
| @@ -3720,39 +3808,55 @@ update_frame_tool_bar (f) | |||
| 3720 | 3808 | ||
| 3721 | if (img->load_failed_p || img->pixmap == None) | 3809 | if (img->load_failed_p || img->pixmap == None) |
| 3722 | { | 3810 | { |
| 3723 | if (wicon) | 3811 | if (ti) |
| 3724 | gtk_widget_hide (wicon); | 3812 | gtk_widget_hide_all (GTK_WIDGET (ti)); |
| 3725 | else | 3813 | else |
| 3726 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), | 3814 | { |
| 3727 | gtk_tool_button_new (NULL, ""), | 3815 | /* Insert an empty (non-image) button */ |
| 3728 | i); | 3816 | weventbox = gtk_event_box_new (); |
| 3817 | wbutton = gtk_button_new (); | ||
| 3818 | gtk_button_set_focus_on_click (GTK_BUTTON (wbutton), FALSE); | ||
| 3819 | gtk_button_set_relief (GTK_BUTTON (wbutton), GTK_RELIEF_NONE); | ||
| 3820 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | ||
| 3821 | ti = gtk_tool_item_new (); | ||
| 3822 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | ||
| 3823 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | ||
| 3824 | } | ||
| 3729 | continue; | 3825 | continue; |
| 3730 | } | 3826 | } |
| 3731 | 3827 | ||
| 3732 | if (! wicon) | 3828 | if (ti == NULL) |
| 3733 | { | 3829 | { |
| 3734 | GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); | 3830 | GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); |
| 3735 | GtkToolItem *ti = gtk_tool_button_new (w, ""); | ||
| 3736 | |||
| 3737 | gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); | 3831 | gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); |
| 3832 | wbutton = gtk_button_new (); | ||
| 3833 | gtk_button_set_focus_on_click (GTK_BUTTON (wbutton), FALSE); | ||
| 3834 | gtk_button_set_relief (GTK_BUTTON (wbutton), GTK_RELIEF_NONE); | ||
| 3835 | gtk_container_add (GTK_CONTAINER (wbutton), w); | ||
| 3836 | weventbox = gtk_event_box_new (); | ||
| 3837 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | ||
| 3838 | ti = gtk_tool_item_new (); | ||
| 3839 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | ||
| 3840 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | ||
| 3841 | |||
| 3738 | 3842 | ||
| 3739 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), | ||
| 3740 | ti, | ||
| 3741 | i); | ||
| 3742 | /* The EMACS_INT cast avoids a warning. */ | 3843 | /* The EMACS_INT cast avoids a warning. */ |
| 3743 | g_signal_connect (GTK_WIDGET (ti), "clicked", | 3844 | g_signal_connect (G_OBJECT (ti), "create-menu-proxy", |
| 3845 | GTK_SIGNAL_FUNC (xg_tool_bar_menu_proxy), | ||
| 3846 | (gpointer) (EMACS_INT) i); | ||
| 3847 | |||
| 3848 | g_signal_connect (G_OBJECT (wbutton), "clicked", | ||
| 3744 | GTK_SIGNAL_FUNC (xg_tool_bar_callback), | 3849 | GTK_SIGNAL_FUNC (xg_tool_bar_callback), |
| 3745 | (gpointer) (EMACS_INT) i); | 3850 | (gpointer) (EMACS_INT) i); |
| 3746 | 3851 | ||
| 3747 | gtk_widget_show (GTK_WIDGET (ti)); | 3852 | gtk_widget_show_all (GTK_WIDGET (ti)); |
| 3748 | gtk_widget_show (GTK_WIDGET (w)); | ||
| 3749 | 3853 | ||
| 3750 | /* Save the image so we can see if an update is needed when | 3854 | /* Save the image so we can see if an update is needed when |
| 3751 | this function is called again. */ | 3855 | this function is called again. */ |
| 3752 | g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA, | 3856 | g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA, |
| 3753 | (gpointer)img->pixmap); | 3857 | (gpointer)img->pixmap); |
| 3754 | 3858 | ||
| 3755 | g_object_set_data (G_OBJECT (ti), XG_FRAME_DATA, (gpointer)f); | 3859 | g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f); |
| 3756 | 3860 | ||
| 3757 | /* Catch expose events to overcome an annoying redraw bug, see | 3861 | /* Catch expose events to overcome an annoying redraw bug, see |
| 3758 | comment for xg_tool_bar_item_expose_callback. */ | 3862 | comment for xg_tool_bar_item_expose_callback. */ |
| @@ -3761,46 +3865,37 @@ update_frame_tool_bar (f) | |||
| 3761 | G_CALLBACK (xg_tool_bar_item_expose_callback), | 3865 | G_CALLBACK (xg_tool_bar_item_expose_callback), |
| 3762 | 0); | 3866 | 0); |
| 3763 | 3867 | ||
| 3764 | gtk_widget_set_sensitive (GTK_WIDGET (ti), enabled_p); | 3868 | gtk_widget_set_sensitive (wbutton, enabled_p); |
| 3765 | gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (ti), FALSE); | 3869 | gtk_tool_item_set_homogeneous (ti, FALSE); |
| 3766 | 3870 | ||
| 3767 | while (! GTK_IS_BUTTON (w)) | ||
| 3768 | w = gtk_widget_get_parent (w); | ||
| 3769 | |||
| 3770 | /* Callback to save modifyer mask (Shift/Control, etc). GTK makes | 3871 | /* Callback to save modifyer mask (Shift/Control, etc). GTK makes |
| 3771 | no distinction based on modifiers in the activate callback, | 3872 | no distinction based on modifiers in the activate callback, |
| 3772 | so we have to do it ourselves. */ | 3873 | so we have to do it ourselves. */ |
| 3773 | g_signal_connect (w, "button-release-event", | 3874 | g_signal_connect (wbutton, "button-release-event", |
| 3774 | GTK_SIGNAL_FUNC (xg_tool_bar_button_cb), | 3875 | GTK_SIGNAL_FUNC (xg_tool_bar_button_cb), |
| 3775 | ti); | 3876 | NULL); |
| 3776 | 3877 | ||
| 3777 | g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f); | 3878 | g_object_set_data (G_OBJECT (wbutton), XG_FRAME_DATA, (gpointer)f); |
| 3778 | 3879 | ||
| 3779 | /* Use enter/leave notify to show help. We use the events | 3880 | /* Use enter/leave notify to show help. We use the events |
| 3780 | rather than the GtkButton specific signals "enter" and | 3881 | rather than the GtkButton specific signals "enter" and |
| 3781 | "leave", so we can have only one callback. The event | 3882 | "leave", so we can have only one callback. The event |
| 3782 | will tell us what kind of event it is. */ | 3883 | will tell us what kind of event it is. */ |
| 3783 | /* The EMACS_INT cast avoids a warning. */ | 3884 | /* The EMACS_INT cast avoids a warning. */ |
| 3784 | g_signal_connect (G_OBJECT (w), | 3885 | g_signal_connect (G_OBJECT (weventbox), |
| 3785 | "enter-notify-event", | 3886 | "enter-notify-event", |
| 3786 | G_CALLBACK (xg_tool_bar_help_callback), | 3887 | G_CALLBACK (xg_tool_bar_help_callback), |
| 3787 | (gpointer) (EMACS_INT) i); | 3888 | (gpointer) (EMACS_INT) i); |
| 3788 | g_signal_connect (G_OBJECT (w), | 3889 | g_signal_connect (G_OBJECT (weventbox), |
| 3789 | "leave-notify-event", | 3890 | "leave-notify-event", |
| 3790 | G_CALLBACK (xg_tool_bar_help_callback), | 3891 | G_CALLBACK (xg_tool_bar_help_callback), |
| 3791 | (gpointer) (EMACS_INT) i); | 3892 | (gpointer) (EMACS_INT) i); |
| 3792 | } | 3893 | } |
| 3793 | else | 3894 | else |
| 3794 | { | 3895 | { |
| 3795 | /* The child of the tool bar is a button. Inside that button | 3896 | GtkWidget *wimage = gtk_bin_get_child (GTK_BIN (wbutton)); |
| 3796 | is a vbox. Inside that vbox is the GtkImage. */ | ||
| 3797 | GtkWidget *wvbox = gtk_bin_get_child (GTK_BIN (wicon)); | ||
| 3798 | GList *chlist = gtk_container_get_children (GTK_CONTAINER (wvbox)); | ||
| 3799 | GtkImage *wimage = GTK_IMAGE (chlist->data); | ||
| 3800 | Pixmap old_img = (Pixmap)g_object_get_data (G_OBJECT (wimage), | 3897 | Pixmap old_img = (Pixmap)g_object_get_data (G_OBJECT (wimage), |
| 3801 | XG_TOOL_BAR_IMAGE_DATA); | 3898 | XG_TOOL_BAR_IMAGE_DATA); |
| 3802 | g_list_free (chlist); | ||
| 3803 | |||
| 3804 | gtk_misc_set_padding (GTK_MISC (wimage), hmargin, vmargin); | 3899 | gtk_misc_set_padding (GTK_MISC (wimage), hmargin, vmargin); |
| 3805 | 3900 | ||
| 3806 | if (old_img != img->pixmap) | 3901 | if (old_img != img->pixmap) |
| @@ -3809,21 +3904,20 @@ update_frame_tool_bar (f) | |||
| 3809 | g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA, | 3904 | g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA, |
| 3810 | (gpointer)img->pixmap); | 3905 | (gpointer)img->pixmap); |
| 3811 | 3906 | ||
| 3812 | gtk_widget_set_sensitive (wicon, enabled_p); | 3907 | gtk_widget_set_sensitive (wbutton, enabled_p); |
| 3813 | gtk_widget_show (wicon); | 3908 | gtk_widget_show_all (GTK_WIDGET (ti)); |
| 3814 | } | 3909 | } |
| 3815 | 3910 | ||
| 3816 | #undef PROP | 3911 | #undef PROP |
| 3817 | } | 3912 | } |
| 3818 | 3913 | ||
| 3819 | /* Remove buttons not longer needed. We just hide them so they | 3914 | /* Remove buttons not longer needed. We just hide them so they |
| 3820 | can be reused later on. */ | 3915 | can be reused later on. */ |
| 3821 | while (iter) | 3916 | do |
| 3822 | { | 3917 | { |
| 3823 | GtkWidget *w = GTK_WIDGET (iter->data); | 3918 | ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i++); |
| 3824 | gtk_widget_hide (w); | 3919 | if (ti) gtk_widget_hide_all (GTK_WIDGET (ti)); |
| 3825 | iter = g_list_next (iter); | 3920 | } while (ti != NULL); |
| 3826 | } | ||
| 3827 | 3921 | ||
| 3828 | gtk_widget_size_request (x->toolbar_widget, &new_req); | 3922 | gtk_widget_size_request (x->toolbar_widget, &new_req); |
| 3829 | if (old_req.height != new_req.height | 3923 | if (old_req.height != new_req.height |
| @@ -3833,8 +3927,6 @@ update_frame_tool_bar (f) | |||
| 3833 | xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f)); | 3927 | xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f)); |
| 3834 | } | 3928 | } |
| 3835 | 3929 | ||
| 3836 | if (icon_list) g_list_free (icon_list); | ||
| 3837 | |||
| 3838 | UNBLOCK_INPUT; | 3930 | UNBLOCK_INPUT; |
| 3839 | } | 3931 | } |
| 3840 | 3932 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 2f4879da110..656a642c666 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -684,6 +684,9 @@ static void handle_interrupt P_ ((void)); | |||
| 684 | static void timer_start_idle P_ ((void)); | 684 | static void timer_start_idle P_ ((void)); |
| 685 | static void timer_stop_idle P_ ((void)); | 685 | static void timer_stop_idle P_ ((void)); |
| 686 | static void timer_resume_idle P_ ((void)); | 686 | static void timer_resume_idle P_ ((void)); |
| 687 | static SIGTYPE handle_user_signal P_ ((int)); | ||
| 688 | static char *find_user_signal_name P_ ((int)); | ||
| 689 | static int store_user_signal_events P_ ((void)); | ||
| 687 | 690 | ||
| 688 | /* Nonzero means don't try to suspend even if the operating system seems | 691 | /* Nonzero means don't try to suspend even if the operating system seems |
| 689 | to support it. */ | 692 | to support it. */ |
| @@ -1506,13 +1509,25 @@ usage: (track-mouse BODY ...) */) | |||
| 1506 | } | 1509 | } |
| 1507 | 1510 | ||
| 1508 | /* If mouse has moved on some frame, return one of those frames. | 1511 | /* If mouse has moved on some frame, return one of those frames. |
| 1509 | Return 0 otherwise. */ | 1512 | |
| 1513 | Return 0 otherwise. | ||
| 1514 | |||
| 1515 | If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement | ||
| 1516 | after resizing the tool-bar window. */ | ||
| 1517 | |||
| 1518 | int ignore_mouse_drag_p; | ||
| 1510 | 1519 | ||
| 1511 | static FRAME_PTR | 1520 | static FRAME_PTR |
| 1512 | some_mouse_moved () | 1521 | some_mouse_moved () |
| 1513 | { | 1522 | { |
| 1514 | Lisp_Object tail, frame; | 1523 | Lisp_Object tail, frame; |
| 1515 | 1524 | ||
| 1525 | if (ignore_mouse_drag_p) | ||
| 1526 | { | ||
| 1527 | /* ignore_mouse_drag_p = 0; */ | ||
| 1528 | return 0; | ||
| 1529 | } | ||
| 1530 | |||
| 1516 | FOR_EACH_FRAME (tail, frame) | 1531 | FOR_EACH_FRAME (tail, frame) |
| 1517 | { | 1532 | { |
| 1518 | if (XFRAME (frame)->mouse_moved) | 1533 | if (XFRAME (frame)->mouse_moved) |
| @@ -5182,15 +5197,6 @@ Lisp_Object *scroll_bar_parts[] = { | |||
| 5182 | &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio | 5197 | &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio |
| 5183 | }; | 5198 | }; |
| 5184 | 5199 | ||
| 5185 | /* User signal events. */ | ||
| 5186 | Lisp_Object Qusr1_signal, Qusr2_signal; | ||
| 5187 | |||
| 5188 | Lisp_Object *lispy_user_signals[] = | ||
| 5189 | { | ||
| 5190 | &Qusr1_signal, &Qusr2_signal | ||
| 5191 | }; | ||
| 5192 | |||
| 5193 | |||
| 5194 | /* A vector, indexed by button number, giving the down-going location | 5200 | /* A vector, indexed by button number, giving the down-going location |
| 5195 | of currently depressed buttons, both scroll bar and non-scroll bar. | 5201 | of currently depressed buttons, both scroll bar and non-scroll bar. |
| 5196 | 5202 | ||
| @@ -5704,6 +5710,7 @@ make_lispy_event (event) | |||
| 5704 | double_click_count = 1; | 5710 | double_click_count = 1; |
| 5705 | button_down_time = event->timestamp; | 5711 | button_down_time = event->timestamp; |
| 5706 | *start_pos_ptr = Fcopy_alist (position); | 5712 | *start_pos_ptr = Fcopy_alist (position); |
| 5713 | ignore_mouse_drag_p = 0; | ||
| 5707 | } | 5714 | } |
| 5708 | 5715 | ||
| 5709 | /* Now we're releasing a button - check the co-ordinates to | 5716 | /* Now we're releasing a button - check the co-ordinates to |
| @@ -5739,8 +5746,13 @@ make_lispy_event (event) | |||
| 5739 | ydiff = XINT (event->y) - XINT (XCDR (down)); | 5746 | ydiff = XINT (event->y) - XINT (XCDR (down)); |
| 5740 | } | 5747 | } |
| 5741 | 5748 | ||
| 5742 | if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz | 5749 | if (ignore_mouse_drag_p) |
| 5743 | && ydiff < double_click_fuzz && ydiff > - double_click_fuzz | 5750 | { |
| 5751 | event->modifiers |= click_modifier; | ||
| 5752 | ignore_mouse_drag_p = 0; | ||
| 5753 | } | ||
| 5754 | else if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz | ||
| 5755 | && ydiff < double_click_fuzz && ydiff > - double_click_fuzz | ||
| 5744 | /* Maybe the mouse has moved a lot, caused scrolling, and | 5756 | /* Maybe the mouse has moved a lot, caused scrolling, and |
| 5745 | eventually ended up at the same screen position (but | 5757 | eventually ended up at the same screen position (but |
| 5746 | not buffer position) in which case it is a drag, not | 5758 | not buffer position) in which case it is a drag, not |
| @@ -6063,7 +6075,12 @@ make_lispy_event (event) | |||
| 6063 | 6075 | ||
| 6064 | case USER_SIGNAL_EVENT: | 6076 | case USER_SIGNAL_EVENT: |
| 6065 | /* A user signal. */ | 6077 | /* A user signal. */ |
| 6066 | return *lispy_user_signals[event->code]; | 6078 | { |
| 6079 | char *name = find_user_signal_name (event->code); | ||
| 6080 | if (!name) | ||
| 6081 | abort (); | ||
| 6082 | return intern (name); | ||
| 6083 | } | ||
| 6067 | 6084 | ||
| 6068 | case SAVE_SESSION_EVENT: | 6085 | case SAVE_SESSION_EVENT: |
| 6069 | return Qsave_session; | 6086 | return Qsave_session; |
| @@ -6904,6 +6921,10 @@ read_avail_input (expected) | |||
| 6904 | int err = 0; | 6921 | int err = 0; |
| 6905 | struct terminal *t; | 6922 | struct terminal *t; |
| 6906 | 6923 | ||
| 6924 | /* Store pending user signal events, if any. */ | ||
| 6925 | if (store_user_signal_events ()) | ||
| 6926 | expected = 0; | ||
| 6927 | |||
| 6907 | /* Loop through the available terminals, and call their input hooks. */ | 6928 | /* Loop through the available terminals, and call their input hooks. */ |
| 6908 | t = terminal_list; | 6929 | t = terminal_list; |
| 6909 | while (t) | 6930 | while (t) |
| @@ -7197,6 +7218,131 @@ reinvoke_input_signal () | |||
| 7197 | 7218 | ||
| 7198 | 7219 | ||
| 7199 | 7220 | ||
| 7221 | /* User signal events. */ | ||
| 7222 | |||
| 7223 | struct user_signal_info | ||
| 7224 | { | ||
| 7225 | /* Signal number. */ | ||
| 7226 | int sig; | ||
| 7227 | |||
| 7228 | /* Name of the signal. */ | ||
| 7229 | char *name; | ||
| 7230 | |||
| 7231 | /* Number of pending signals. */ | ||
| 7232 | int npending; | ||
| 7233 | |||
| 7234 | struct user_signal_info *next; | ||
| 7235 | }; | ||
| 7236 | |||
| 7237 | /* List of user signals. */ | ||
| 7238 | static struct user_signal_info *user_signals = NULL; | ||
| 7239 | |||
| 7240 | void | ||
| 7241 | add_user_signal (sig, name) | ||
| 7242 | int sig; | ||
| 7243 | const char *name; | ||
| 7244 | { | ||
| 7245 | struct user_signal_info *p; | ||
| 7246 | |||
| 7247 | for (p = user_signals; p; p = p->next) | ||
| 7248 | if (p->sig == sig) | ||
| 7249 | /* Already added. */ | ||
| 7250 | return; | ||
| 7251 | |||
| 7252 | p = xmalloc (sizeof (struct user_signal_info)); | ||
| 7253 | p->sig = sig; | ||
| 7254 | p->name = xstrdup (name); | ||
| 7255 | p->npending = 0; | ||
| 7256 | p->next = user_signals; | ||
| 7257 | user_signals = p; | ||
| 7258 | |||
| 7259 | signal (sig, handle_user_signal); | ||
| 7260 | } | ||
| 7261 | |||
| 7262 | static SIGTYPE | ||
| 7263 | handle_user_signal (sig) | ||
| 7264 | int sig; | ||
| 7265 | { | ||
| 7266 | int old_errno = errno; | ||
| 7267 | struct user_signal_info *p; | ||
| 7268 | |||
| 7269 | #if defined (USG) && !defined (POSIX_SIGNALS) | ||
| 7270 | /* USG systems forget handlers when they are used; | ||
| 7271 | must reestablish each time */ | ||
| 7272 | signal (sig, handle_user_signal); | ||
| 7273 | #endif | ||
| 7274 | |||
| 7275 | SIGNAL_THREAD_CHECK (sig); | ||
| 7276 | |||
| 7277 | for (p = user_signals; p; p = p->next) | ||
| 7278 | if (p->sig == sig) | ||
| 7279 | { | ||
| 7280 | p->npending++; | ||
| 7281 | #ifdef SIGIO | ||
| 7282 | if (interrupt_input) | ||
| 7283 | kill (getpid (), SIGIO); | ||
| 7284 | else | ||
| 7285 | #endif | ||
| 7286 | { | ||
| 7287 | /* Tell wait_reading_process_output that it needs to wake | ||
| 7288 | up and look around. */ | ||
| 7289 | if (input_available_clear_time) | ||
| 7290 | EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); | ||
| 7291 | } | ||
| 7292 | break; | ||
| 7293 | } | ||
| 7294 | |||
| 7295 | errno = old_errno; | ||
| 7296 | } | ||
| 7297 | |||
| 7298 | static char * | ||
| 7299 | find_user_signal_name (sig) | ||
| 7300 | int sig; | ||
| 7301 | { | ||
| 7302 | struct user_signal_info *p; | ||
| 7303 | |||
| 7304 | for (p = user_signals; p; p = p->next) | ||
| 7305 | if (p->sig == sig) | ||
| 7306 | return p->name; | ||
| 7307 | |||
| 7308 | return NULL; | ||
| 7309 | } | ||
| 7310 | |||
| 7311 | static int | ||
| 7312 | store_user_signal_events () | ||
| 7313 | { | ||
| 7314 | struct user_signal_info *p; | ||
| 7315 | struct input_event buf; | ||
| 7316 | int nstored = 0; | ||
| 7317 | |||
| 7318 | for (p = user_signals; p; p = p->next) | ||
| 7319 | if (p->npending > 0) | ||
| 7320 | { | ||
| 7321 | SIGMASKTYPE mask; | ||
| 7322 | |||
| 7323 | if (nstored == 0) | ||
| 7324 | { | ||
| 7325 | bzero (&buf, sizeof buf); | ||
| 7326 | buf.kind = USER_SIGNAL_EVENT; | ||
| 7327 | buf.frame_or_window = selected_frame; | ||
| 7328 | } | ||
| 7329 | nstored += p->npending; | ||
| 7330 | |||
| 7331 | mask = sigblock (sigmask (p->sig)); | ||
| 7332 | do | ||
| 7333 | { | ||
| 7334 | buf.code = p->sig; | ||
| 7335 | kbd_buffer_store_event (&buf); | ||
| 7336 | p->npending--; | ||
| 7337 | } | ||
| 7338 | while (p->npending > 0); | ||
| 7339 | sigsetmask (mask); | ||
| 7340 | } | ||
| 7341 | |||
| 7342 | return nstored; | ||
| 7343 | } | ||
| 7344 | |||
| 7345 | |||
| 7200 | static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*)); | 7346 | static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*)); |
| 7201 | static Lisp_Object menu_bar_one_keymap_changed_items; | 7347 | static Lisp_Object menu_bar_one_keymap_changed_items; |
| 7202 | 7348 | ||
| @@ -11422,11 +11568,6 @@ syms_of_keyboard () | |||
| 11422 | staticpro (&Qmac_apple_event); | 11568 | staticpro (&Qmac_apple_event); |
| 11423 | #endif | 11569 | #endif |
| 11424 | 11570 | ||
| 11425 | Qusr1_signal = intern ("usr1-signal"); | ||
| 11426 | staticpro (&Qusr1_signal); | ||
| 11427 | Qusr2_signal = intern ("usr2-signal"); | ||
| 11428 | staticpro (&Qusr2_signal); | ||
| 11429 | |||
| 11430 | Qmenu_enable = intern ("menu-enable"); | 11571 | Qmenu_enable = intern ("menu-enable"); |
| 11431 | staticpro (&Qmenu_enable); | 11572 | staticpro (&Qmenu_enable); |
| 11432 | Qmenu_alias = intern ("menu-alias"); | 11573 | Qmenu_alias = intern ("menu-alias"); |
| @@ -11724,8 +11865,8 @@ Polling is automatically disabled in all other cases. */); | |||
| 11724 | 11865 | ||
| 11725 | DEFVAR_LISP ("double-click-time", &Vdouble_click_time, | 11866 | DEFVAR_LISP ("double-click-time", &Vdouble_click_time, |
| 11726 | doc: /* *Maximum time between mouse clicks to make a double-click. | 11867 | doc: /* *Maximum time between mouse clicks to make a double-click. |
| 11727 | Measured in milliseconds. nil means disable double-click recognition; | 11868 | Measured in milliseconds. The value nil means disable double-click |
| 11728 | t means double-clicks have no time limit and are detected | 11869 | recognition; t means double-clicks have no time limit and are detected |
| 11729 | by position only. */); | 11870 | by position only. */); |
| 11730 | Vdouble_click_time = make_number (500); | 11871 | Vdouble_click_time = make_number (500); |
| 11731 | 11872 | ||
diff --git a/src/keyboard.h b/src/keyboard.h index 8f1c5dd31a9..749a8aefb28 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -358,6 +358,7 @@ extern void gen_help_event P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | |||
| 358 | extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object)); | 358 | extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object)); |
| 359 | extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object)); | 359 | extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object)); |
| 360 | extern int kbd_buffer_events_waiting P_ ((int)); | 360 | extern int kbd_buffer_events_waiting P_ ((int)); |
| 361 | extern void add_user_signals P_ ((int, const char *)); | ||
| 361 | 362 | ||
| 362 | extern int tty_read_avail_input P_ ((struct terminal *, int, | 363 | extern int tty_read_avail_input P_ ((struct terminal *, int, |
| 363 | struct input_event *)); | 364 | struct input_event *)); |
diff --git a/src/keymap.c b/src/keymap.c index 065631ccff5..634a52b3834 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1117,7 +1117,8 @@ DEF is anything that can be a key's definition: | |||
| 1117 | or another symbol whose function definition is used, etc.), | 1117 | or another symbol whose function definition is used, etc.), |
| 1118 | a cons (STRING . DEFN), meaning that DEFN is the definition | 1118 | a cons (STRING . DEFN), meaning that DEFN is the definition |
| 1119 | (DEFN should be a valid definition in its own right), | 1119 | (DEFN should be a valid definition in its own right), |
| 1120 | or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP. | 1120 | or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP, |
| 1121 | or an extended menu item definition. (See info node `Extended Menu Items'.) | ||
| 1121 | 1122 | ||
| 1122 | If KEYMAP is a sparse keymap with a binding for KEY, the existing | 1123 | If KEYMAP is a sparse keymap with a binding for KEY, the existing |
| 1123 | binding is altered. If there is no binding for KEY, the new pair | 1124 | binding is altered. If there is no binding for KEY, the new pair |
| @@ -1240,7 +1241,8 @@ buffer position instead of point are used. */) | |||
| 1240 | 1241 | ||
| 1241 | DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0, | 1242 | DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0, |
| 1242 | doc: /* In keymap KEYMAP, look up key sequence KEY. Return the definition. | 1243 | doc: /* In keymap KEYMAP, look up key sequence KEY. Return the definition. |
| 1243 | nil means undefined. See doc of `define-key' for kinds of definitions. | 1244 | A value of nil means undefined. See doc of `define-key' |
| 1245 | for kinds of definitions. | ||
| 1244 | 1246 | ||
| 1245 | A number as value means KEY is "too long"; | 1247 | A number as value means KEY is "too long"; |
| 1246 | that is, characters or symbols in it except for the last one | 1248 | that is, characters or symbols in it except for the last one |
| @@ -1615,13 +1617,13 @@ specified buffer position instead of point are used. | |||
| 1615 | are read using the keymaps of the buffer clicked on, not | 1617 | are read using the keymaps of the buffer clicked on, not |
| 1616 | the current buffer. So we may have to switch the buffer | 1618 | the current buffer. So we may have to switch the buffer |
| 1617 | here. */ | 1619 | here. */ |
| 1618 | 1620 | ||
| 1619 | if (CONSP (position)) | 1621 | if (CONSP (position)) |
| 1620 | { | 1622 | { |
| 1621 | Lisp_Object window; | 1623 | Lisp_Object window; |
| 1622 | 1624 | ||
| 1623 | window = POSN_WINDOW (position); | 1625 | window = POSN_WINDOW (position); |
| 1624 | 1626 | ||
| 1625 | if (WINDOWP (window) | 1627 | if (WINDOWP (window) |
| 1626 | && BUFFERP (XWINDOW (window)->buffer) | 1628 | && BUFFERP (XWINDOW (window)->buffer) |
| 1627 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) | 1629 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) |
| @@ -1633,13 +1635,13 @@ specified buffer position instead of point are used. | |||
| 1633 | would not be a problem here, but it is easier to keep | 1635 | would not be a problem here, but it is easier to keep |
| 1634 | things the same. | 1636 | things the same. |
| 1635 | */ | 1637 | */ |
| 1636 | 1638 | ||
| 1637 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 1639 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 1638 | 1640 | ||
| 1639 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 1641 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 1640 | } | 1642 | } |
| 1641 | } | 1643 | } |
| 1642 | 1644 | ||
| 1643 | if (! NILP (current_kboard->Voverriding_terminal_local_map)) | 1645 | if (! NILP (current_kboard->Voverriding_terminal_local_map)) |
| 1644 | { | 1646 | { |
| 1645 | value = Flookup_key (current_kboard->Voverriding_terminal_local_map, | 1647 | value = Flookup_key (current_kboard->Voverriding_terminal_local_map, |
| @@ -1662,8 +1664,8 @@ specified buffer position instead of point are used. | |||
| 1662 | : MARKERP (position) ? marker_position (position) | 1664 | : MARKERP (position) ? marker_position (position) |
| 1663 | : PT; | 1665 | : PT; |
| 1664 | 1666 | ||
| 1665 | local_map = get_local_map (pt, current_buffer, Qlocal_map); | 1667 | local_map = get_local_map (pt, current_buffer, Qlocal_map); |
| 1666 | keymap = get_local_map (pt, current_buffer, Qkeymap); | 1668 | keymap = get_local_map (pt, current_buffer, Qkeymap); |
| 1667 | 1669 | ||
| 1668 | if (CONSP (position)) | 1670 | if (CONSP (position)) |
| 1669 | { | 1671 | { |
| @@ -1671,7 +1673,7 @@ specified buffer position instead of point are used. | |||
| 1671 | 1673 | ||
| 1672 | /* For a mouse click, get the local text-property keymap | 1674 | /* For a mouse click, get the local text-property keymap |
| 1673 | of the place clicked on, rather than point. */ | 1675 | of the place clicked on, rather than point. */ |
| 1674 | 1676 | ||
| 1675 | if (POSN_INBUFFER_P (position)) | 1677 | if (POSN_INBUFFER_P (position)) |
| 1676 | { | 1678 | { |
| 1677 | Lisp_Object pos; | 1679 | Lisp_Object pos; |
| @@ -1682,7 +1684,7 @@ specified buffer position instead of point are used. | |||
| 1682 | { | 1684 | { |
| 1683 | local_map = get_local_map (XINT (pos), | 1685 | local_map = get_local_map (XINT (pos), |
| 1684 | current_buffer, Qlocal_map); | 1686 | current_buffer, Qlocal_map); |
| 1685 | 1687 | ||
| 1686 | keymap = get_local_map (XINT (pos), | 1688 | keymap = get_local_map (XINT (pos), |
| 1687 | current_buffer, Qkeymap); | 1689 | current_buffer, Qkeymap); |
| 1688 | } | 1690 | } |
| @@ -1693,12 +1695,12 @@ specified buffer position instead of point are used. | |||
| 1693 | string displayed via the `display' property, | 1695 | string displayed via the `display' property, |
| 1694 | consider `local-map' and `keymap' properties of | 1696 | consider `local-map' and `keymap' properties of |
| 1695 | that string. */ | 1697 | that string. */ |
| 1696 | 1698 | ||
| 1697 | if (string = POSN_STRING (position), | 1699 | if (string = POSN_STRING (position), |
| 1698 | (CONSP (string) && STRINGP (XCAR (string)))) | 1700 | (CONSP (string) && STRINGP (XCAR (string)))) |
| 1699 | { | 1701 | { |
| 1700 | Lisp_Object pos, map; | 1702 | Lisp_Object pos, map; |
| 1701 | 1703 | ||
| 1702 | pos = XCDR (string); | 1704 | pos = XCDR (string); |
| 1703 | string = XCAR (string); | 1705 | string = XCAR (string); |
| 1704 | if (INTEGERP (pos) | 1706 | if (INTEGERP (pos) |
| @@ -1714,7 +1716,7 @@ specified buffer position instead of point are used. | |||
| 1714 | keymap = map; | 1716 | keymap = map; |
| 1715 | } | 1717 | } |
| 1716 | } | 1718 | } |
| 1717 | 1719 | ||
| 1718 | } | 1720 | } |
| 1719 | 1721 | ||
| 1720 | if (! NILP (keymap)) | 1722 | if (! NILP (keymap)) |
diff --git a/src/lread.c b/src/lread.c index 596ba79cb57..9142e0c6dcd 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1554,7 +1554,7 @@ DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "", | |||
| 1554 | Programs can pass two arguments, BUFFER and PRINTFLAG. | 1554 | Programs can pass two arguments, BUFFER and PRINTFLAG. |
| 1555 | BUFFER is the buffer to evaluate (nil means use current buffer). | 1555 | BUFFER is the buffer to evaluate (nil means use current buffer). |
| 1556 | PRINTFLAG controls printing of output: | 1556 | PRINTFLAG controls printing of output: |
| 1557 | nil means discard it; anything else is stream for print. | 1557 | A value of nil means discard it; anything else is stream for print. |
| 1558 | 1558 | ||
| 1559 | If the optional third argument FILENAME is non-nil, | 1559 | If the optional third argument FILENAME is non-nil, |
| 1560 | it specifies the file name to use for `load-history'. | 1560 | it specifies the file name to use for `load-history'. |
| @@ -1603,7 +1603,7 @@ When called from programs, expects two arguments, | |||
| 1603 | giving starting and ending indices in the current buffer | 1603 | giving starting and ending indices in the current buffer |
| 1604 | of the text to be executed. | 1604 | of the text to be executed. |
| 1605 | Programs can pass third argument PRINTFLAG which controls output: | 1605 | Programs can pass third argument PRINTFLAG which controls output: |
| 1606 | nil means discard it; anything else is stream for printing it. | 1606 | A value of nil means discard it; anything else is stream for printing it. |
| 1607 | Also the fourth argument READ-FUNCTION, if non-nil, is used | 1607 | Also the fourth argument READ-FUNCTION, if non-nil, is used |
| 1608 | instead of `read' to read each expression. It gets one argument | 1608 | instead of `read' to read each expression. It gets one argument |
| 1609 | which is the input stream for reading characters. | 1609 | which is the input stream for reading characters. |
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index 940ff70dbda..36e62ef6166 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h | |||
| @@ -125,7 +125,16 @@ Boston, MA 02110-1301, USA. */ | |||
| 125 | #undef LIB_STANDARD | 125 | #undef LIB_STANDARD |
| 126 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o | 126 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o |
| 127 | 127 | ||
| 128 | #else /* !__OpenBSD__ && !__FreeBSD__ */ | 128 | #elif defined(__NetBSD__) |
| 129 | |||
| 130 | /* LIB_STANDARD and START_FILES set correctly in s/netbsd.h */ | ||
| 131 | |||
| 132 | #elif defined(sun) | ||
| 133 | |||
| 134 | #undef START_FILES | ||
| 135 | #undef LIB_STANDARD | ||
| 136 | |||
| 137 | #else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !sun */ | ||
| 129 | 138 | ||
| 130 | #undef START_FILES | 139 | #undef START_FILES |
| 131 | #ifdef HAVE_X86_64_LIB64_DIR | 140 | #ifdef HAVE_X86_64_LIB64_DIR |
diff --git a/src/m/hp800.h b/src/m/hp800.h index 01146e52359..1630a0bc883 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h | |||
| @@ -174,6 +174,14 @@ Boston, MA 02110-1301, USA. */ | |||
| 174 | #define rindex strrchr | 174 | #define rindex strrchr |
| 175 | 175 | ||
| 176 | #endif /* __hpux */ | 176 | #endif /* __hpux */ |
| 177 | |||
| 178 | /* Systems with GCC don't need to lose. */ | ||
| 179 | #ifdef __NetBSD__ | ||
| 180 | # ifdef __GNUC__ | ||
| 181 | # define alloca __builtin_alloca | ||
| 182 | # define HAVE_ALLOCA | ||
| 183 | # endif /* __GNUC__ */ | ||
| 184 | #endif /* __NetBSD__ */ | ||
| 177 | 185 | ||
| 178 | /* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c | 186 | /* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c |
| 179 | (do not change this comment) */ | 187 | (do not change this comment) */ |
diff --git a/src/m/sh3el.h b/src/m/sh3el.h new file mode 100644 index 00000000000..0854ecd1b25 --- /dev/null +++ b/src/m/sh3el.h | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* machine description file for sh3el | ||
| 2 | Copyright (C) 1985, 1986 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 21 | |||
| 22 | /* The following line tells the configuration script what sort of | ||
| 23 | operating system this machine is likely to run. | ||
| 24 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | ||
| 25 | |||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | ||
| 27 | is the most significant byte. */ | ||
| 28 | |||
| 29 | #undef WORDS_BIG_ENDIAN | ||
| 30 | |||
| 31 | /* Define NO_ARG_ARRAY if you cannot take the address of the first of a | ||
| 32 | * group of arguments and treat it as an array of the arguments. */ | ||
| 33 | |||
| 34 | #define NO_ARG_ARRAY | ||
| 35 | |||
| 36 | /* Define WORD_MACHINE if addresses and such have | ||
| 37 | * to be corrected before they can be used as byte counts. */ | ||
| 38 | |||
| 39 | #undef WORD_MACHINE | ||
| 40 | |||
| 41 | /* Now define a symbol for the cpu type, if your compiler | ||
| 42 | does not define it automatically: | ||
| 43 | Ones defined so far include vax, m68000, ns16000, pyramid, | ||
| 44 | orion, tahoe, APOLLO and many others */ | ||
| 45 | |||
| 46 | /* Use type int rather than a union, to represent Lisp_Object */ | ||
| 47 | /* This is desirable for most machines. */ | ||
| 48 | |||
| 49 | #define NO_UNION_TYPE | ||
| 50 | |||
| 51 | /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend | ||
| 52 | the 24-bit bit field into an int. In other words, if bit fields | ||
| 53 | are always unsigned. | ||
| 54 | |||
| 55 | If you use NO_UNION_TYPE, this flag does not matter. */ | ||
| 56 | |||
| 57 | #define EXPLICIT_SIGN_EXTEND | ||
| 58 | |||
| 59 | /* Data type of load average, as read out of kmem. */ | ||
| 60 | |||
| 61 | #define LOAD_AVE_TYPE long | ||
| 62 | |||
| 63 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | ||
| 64 | |||
| 65 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | ||
| 66 | |||
| 67 | /* Define CANNOT_DUMP on machines where unexec does not work. | ||
| 68 | Then the function dump-emacs will not be defined | ||
| 69 | and temacs will do (load "loadup") automatically unless told otherwise. */ | ||
| 70 | |||
| 71 | #undef CANNOT_DUMP | ||
| 72 | |||
| 73 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 74 | pure and impure space as loaded can vary, and even their | ||
| 75 | relative order cannot be relied on. | ||
| 76 | |||
| 77 | Otherwise Emacs assumes that text space precedes data space, | ||
| 78 | numerically. */ | ||
| 79 | |||
| 80 | #define VIRT_ADDR_VARIES | ||
| 81 | |||
| 82 | /* Define C_ALLOCA if this machine does not support a true alloca | ||
| 83 | and the one written in C should be used instead. | ||
| 84 | Define HAVE_ALLOCA to say that the system provides a properly | ||
| 85 | working alloca function and it should be used. | ||
| 86 | Define neither one if an assembler-language alloca | ||
| 87 | in the file alloca.s should be used. */ | ||
| 88 | |||
| 89 | /* #define C_ALLOCA */ | ||
| 90 | #define HAVE_ALLOCA | ||
| 91 | |||
| 92 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 93 | to change the boundary between the text section and data section | ||
| 94 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 95 | code will not be sharable; but that's better than failing completely. */ | ||
| 96 | |||
| 97 | #define NO_REMAP | ||
| 98 | |||
| 99 | /* After adding support for a new system, modify the large case | ||
| 100 | statement in the `configure' script to recognize reasonable | ||
| 101 | configuration names, and add a description of the system to | ||
| 102 | `etc/MACHINES'. | ||
| 103 | |||
| 104 | If you've just fixed a problem in an existing configuration file, | ||
| 105 | you should also check `etc/MACHINES' to make sure its descriptions | ||
| 106 | of known problems in that configuration should be updated. */ | ||
| 107 | |||
| 108 | /* arch-tag: ee325990-6f40-47a2-b9df-60ecf3599899 | ||
| 109 | (do not change this comment) */ | ||
| @@ -79,6 +79,15 @@ static ComponentInstance as_scripting_component; | |||
| 79 | /* The single script context used for all script executions. */ | 79 | /* The single script context used for all script executions. */ |
| 80 | static OSAID as_script_context; | 80 | static OSAID as_script_context; |
| 81 | 81 | ||
| 82 | #if TARGET_API_MAC_CARBON | ||
| 83 | static int wakeup_from_rne_enabled_p = 0; | ||
| 84 | #define ENABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 1) | ||
| 85 | #define DISABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 0) | ||
| 86 | #else | ||
| 87 | #define ENABLE_WAKEUP_FROM_RNE 0 | ||
| 88 | #define DISABLE_WAKEUP_FROM_RNE 0 | ||
| 89 | #endif | ||
| 90 | |||
| 82 | #ifndef MAC_OSX | 91 | #ifndef MAC_OSX |
| 83 | static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); | 92 | static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); |
| 84 | static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); | 93 | static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); |
| @@ -2431,6 +2440,7 @@ select (nfds, rfds, wfds, efds, timeout) | |||
| 2431 | BLOCK_INPUT block, in case that some input has already been read | 2440 | BLOCK_INPUT block, in case that some input has already been read |
| 2432 | asynchronously. */ | 2441 | asynchronously. */ |
| 2433 | BLOCK_INPUT; | 2442 | BLOCK_INPUT; |
| 2443 | ENABLE_WAKEUP_FROM_RNE; | ||
| 2434 | if (!detect_input_pending ()) | 2444 | if (!detect_input_pending ()) |
| 2435 | { | 2445 | { |
| 2436 | #if TARGET_API_MAC_CARBON | 2446 | #if TARGET_API_MAC_CARBON |
| @@ -2461,6 +2471,7 @@ select (nfds, rfds, wfds, efds, timeout) | |||
| 2461 | } | 2471 | } |
| 2462 | #endif /* not TARGET_API_MAC_CARBON */ | 2472 | #endif /* not TARGET_API_MAC_CARBON */ |
| 2463 | } | 2473 | } |
| 2474 | DISABLE_WAKEUP_FROM_RNE; | ||
| 2464 | UNBLOCK_INPUT; | 2475 | UNBLOCK_INPUT; |
| 2465 | 2476 | ||
| 2466 | if (err == noErr) | 2477 | if (err == noErr) |
| @@ -4841,8 +4852,8 @@ DEFUN ("mac-code-convert-string", Fmac_code_convert_string, Smac_code_convert_st | |||
| 4841 | doc: /* Convert STRING from SOURCE encoding to TARGET encoding. | 4852 | doc: /* Convert STRING from SOURCE encoding to TARGET encoding. |
| 4842 | The conversion is performed using the converter provided by the system. | 4853 | The conversion is performed using the converter provided by the system. |
| 4843 | Each encoding is specified by either a coding system symbol, a mime | 4854 | Each encoding is specified by either a coding system symbol, a mime |
| 4844 | charset string, or an integer as a CFStringEncoding value. Nil for | 4855 | charset string, or an integer as a CFStringEncoding value. An encoding |
| 4845 | encoding means UTF-16 in native byte order, no byte order mark. | 4856 | of nil means UTF-16 in native byte order, no byte order mark. |
| 4846 | On Mac OS X 10.2 and later, you can do Unicode Normalization by | 4857 | On Mac OS X 10.2 and later, you can do Unicode Normalization by |
| 4847 | specifying the optional argument NORMALIZATION-FORM with a symbol NFD, | 4858 | specifying the optional argument NORMALIZATION-FORM with a symbol NFD, |
| 4848 | NFKD, NFC, NFKC, HFS+D, or HFS+C. | 4859 | NFKD, NFC, NFKC, HFS+D, or HFS+C. |
| @@ -5023,6 +5034,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout) | |||
| 5023 | BLOCK_INPUT block, in case that some input has already been read | 5034 | BLOCK_INPUT block, in case that some input has already been read |
| 5024 | asynchronously. */ | 5035 | asynchronously. */ |
| 5025 | BLOCK_INPUT; | 5036 | BLOCK_INPUT; |
| 5037 | ENABLE_WAKEUP_FROM_RNE; | ||
| 5026 | if (!detect_input_pending ()) | 5038 | if (!detect_input_pending ()) |
| 5027 | { | 5039 | { |
| 5028 | EMACS_TIME select_timeout; | 5040 | EMACS_TIME select_timeout; |
| @@ -5045,6 +5057,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout) | |||
| 5045 | kEventLeaveInQueue, NULL); | 5057 | kEventLeaveInQueue, NULL); |
| 5046 | } | 5058 | } |
| 5047 | } | 5059 | } |
| 5060 | DISABLE_WAKEUP_FROM_RNE; | ||
| 5048 | UNBLOCK_INPUT; | 5061 | UNBLOCK_INPUT; |
| 5049 | 5062 | ||
| 5050 | if (r != 0) | 5063 | if (r != 0) |
| @@ -5124,6 +5137,7 @@ sys_select (nfds, rfds, wfds, efds, timeout) | |||
| 5124 | BLOCK_INPUT block, in case that some input has already been | 5137 | BLOCK_INPUT block, in case that some input has already been |
| 5125 | read asynchronously. */ | 5138 | read asynchronously. */ |
| 5126 | BLOCK_INPUT; | 5139 | BLOCK_INPUT; |
| 5140 | ENABLE_WAKEUP_FROM_RNE; | ||
| 5127 | if (!detect_input_pending ()) | 5141 | if (!detect_input_pending ()) |
| 5128 | { | 5142 | { |
| 5129 | int minfd, fd; | 5143 | int minfd, fd; |
| @@ -5184,6 +5198,7 @@ sys_select (nfds, rfds, wfds, efds, timeout) | |||
| 5184 | CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode); | 5198 | CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode); |
| 5185 | } | 5199 | } |
| 5186 | } | 5200 | } |
| 5201 | DISABLE_WAKEUP_FROM_RNE; | ||
| 5187 | UNBLOCK_INPUT; | 5202 | UNBLOCK_INPUT; |
| 5188 | 5203 | ||
| 5189 | if (err == noErr || err == eventLoopQuitErr) | 5204 | if (err == noErr || err == eventLoopQuitErr) |
| @@ -5385,6 +5400,16 @@ init_mac_osx_environment () | |||
| 5385 | } | 5400 | } |
| 5386 | #endif /* MAC_OSX */ | 5401 | #endif /* MAC_OSX */ |
| 5387 | 5402 | ||
| 5403 | #if TARGET_API_MAC_CARBON | ||
| 5404 | void | ||
| 5405 | mac_wakeup_from_rne () | ||
| 5406 | { | ||
| 5407 | if (wakeup_from_rne_enabled_p) | ||
| 5408 | /* Post a harmless event so as to wake up from | ||
| 5409 | ReceiveNextEvent. */ | ||
| 5410 | mac_post_mouse_moved_event (); | ||
| 5411 | } | ||
| 5412 | #endif | ||
| 5388 | 5413 | ||
| 5389 | void | 5414 | void |
| 5390 | syms_of_mac () | 5415 | syms_of_mac () |
diff --git a/src/macfns.c b/src/macfns.c index 14261f67ad6..c74fd1089f0 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -1969,9 +1969,9 @@ mac_update_proxy_icon (f) | |||
| 1969 | { | 1969 | { |
| 1970 | AEDesc desc; | 1970 | AEDesc desc; |
| 1971 | #ifdef MAC_OSX | 1971 | #ifdef MAC_OSX |
| 1972 | FSRef fref; | 1972 | FSRef fref, fref_proxy; |
| 1973 | #else | 1973 | #else |
| 1974 | FSSpec fss; | 1974 | FSSpec fss, fss_proxy; |
| 1975 | #endif | 1975 | #endif |
| 1976 | Boolean changed; | 1976 | Boolean changed; |
| 1977 | Lisp_Object encoded_file_name = ENCODE_FILE (file_name); | 1977 | Lisp_Object encoded_file_name = ENCODE_FILE (file_name); |
| @@ -1997,10 +1997,19 @@ mac_update_proxy_icon (f) | |||
| 1997 | { | 1997 | { |
| 1998 | if (alias) | 1998 | if (alias) |
| 1999 | { | 1999 | { |
| 2000 | /* (FS)ResolveAlias never sets `changed' to true if | ||
| 2001 | `alias' is minimal. */ | ||
| 2000 | #ifdef MAC_OSX | 2002 | #ifdef MAC_OSX |
| 2001 | err = FSUpdateAlias (NULL, &fref, alias, &changed); | 2003 | err = FSResolveAlias (NULL, alias, &fref_proxy, &changed); |
| 2004 | if (err == noErr) | ||
| 2005 | err = FSCompareFSRefs (&fref, &fref_proxy); | ||
| 2002 | #else | 2006 | #else |
| 2003 | err = UpdateAlias (NULL, &fss, alias, &changed); | 2007 | err = ResolveAlias (NULL, alias, &fss_proxy, &changed); |
| 2008 | if (err == noErr) | ||
| 2009 | err = !(fss.vRefNum == fss_proxy.vRefNum | ||
| 2010 | && fss.parID == fss_proxy.parID | ||
| 2011 | && EqualString (fss.name, fss_proxy.name, | ||
| 2012 | false, true)); | ||
| 2004 | #endif | 2013 | #endif |
| 2005 | } | 2014 | } |
| 2006 | if (err != noErr || alias == NULL) | 2015 | if (err != noErr || alias == NULL) |
| @@ -2051,11 +2060,11 @@ mac_update_title_bar (f, save_match_data) | |||
| 2051 | confusing. */ | 2060 | confusing. */ |
| 2052 | || (!MINI_WINDOW_P (w) | 2061 | || (!MINI_WINDOW_P (w) |
| 2053 | && (modified_p != !NILP (w->last_had_star)))) | 2062 | && (modified_p != !NILP (w->last_had_star)))) |
| 2054 | SetWindowModified (FRAME_MAC_WINDOW (f), | 2063 | { |
| 2055 | !MINI_WINDOW_P (w) && modified_p); | 2064 | SetWindowModified (FRAME_MAC_WINDOW (f), |
| 2056 | 2065 | !MINI_WINDOW_P (w) && modified_p); | |
| 2057 | if (windows_or_buffers_changed) | 2066 | mac_update_proxy_icon (f); |
| 2058 | mac_update_proxy_icon (f); | 2067 | } |
| 2059 | #endif | 2068 | #endif |
| 2060 | } | 2069 | } |
| 2061 | 2070 | ||
| @@ -4597,6 +4606,30 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */) | |||
| 4597 | return Qnil; | 4606 | return Qnil; |
| 4598 | } | 4607 | } |
| 4599 | #endif | 4608 | #endif |
| 4609 | |||
| 4610 | #if USE_ATSUI | ||
| 4611 | extern Lisp_Object mac_atsu_font_face_attributes P_ ((ATSUFontID)); | ||
| 4612 | |||
| 4613 | DEFUN ("mac-atsu-font-face-attributes", Fmac_atsu_font_face_attributes, | ||
| 4614 | Smac_atsu_font_face_attributes, 1, 1, 0, | ||
| 4615 | doc: /* Return plist of face attributes and values for ATSU font ID. | ||
| 4616 | ID is specified by either an integer or a float. */) | ||
| 4617 | (id) | ||
| 4618 | Lisp_Object id; | ||
| 4619 | { | ||
| 4620 | ATSUFontID font_id; | ||
| 4621 | Lisp_Object result; | ||
| 4622 | |||
| 4623 | check_mac (); | ||
| 4624 | CHECK_NUMBER_OR_FLOAT(id); | ||
| 4625 | font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id); | ||
| 4626 | BLOCK_INPUT; | ||
| 4627 | result = mac_atsu_font_face_attributes (font_id); | ||
| 4628 | UNBLOCK_INPUT; | ||
| 4629 | return result; | ||
| 4630 | } | ||
| 4631 | #endif | ||
| 4632 | |||
| 4600 | 4633 | ||
| 4601 | /*********************************************************************** | 4634 | /*********************************************************************** |
| 4602 | Initialization | 4635 | Initialization |
| @@ -4829,6 +4862,9 @@ Chinese, Japanese, and Korean. */); | |||
| 4829 | #if USE_MAC_FONT_PANEL | 4862 | #if USE_MAC_FONT_PANEL |
| 4830 | defsubr (&Smac_set_font_panel_visibility); | 4863 | defsubr (&Smac_set_font_panel_visibility); |
| 4831 | #endif | 4864 | #endif |
| 4865 | #if USE_ATSUI | ||
| 4866 | defsubr (&Smac_atsu_font_face_attributes); | ||
| 4867 | #endif | ||
| 4832 | } | 4868 | } |
| 4833 | 4869 | ||
| 4834 | /* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc | 4870 | /* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc |
diff --git a/src/macselect.c b/src/macselect.c index 7a952f88367..8d15db24144 100644 --- a/src/macselect.c +++ b/src/macselect.c | |||
| @@ -1567,8 +1567,7 @@ mac_do_receive_drag (window, refcon, drag) | |||
| 1567 | { | 1567 | { |
| 1568 | mac_store_drag_event (window, mouse_pos, modifiers, &apple_event); | 1568 | mac_store_drag_event (window, mouse_pos, modifiers, &apple_event); |
| 1569 | AEDisposeDesc (&apple_event); | 1569 | AEDisposeDesc (&apple_event); |
| 1570 | /* Post a harmless event so as to wake up from ReceiveNextEvent. */ | 1570 | mac_wakeup_from_rne (); |
| 1571 | mac_post_mouse_moved_event (); | ||
| 1572 | return noErr; | 1571 | return noErr; |
| 1573 | } | 1572 | } |
| 1574 | else | 1573 | else |
diff --git a/src/macterm.c b/src/macterm.c index 4739a52520e..6eaf549ba85 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -1154,7 +1154,8 @@ mac_query_char_extents (style, c, | |||
| 1154 | UniChar ch = c; | 1154 | UniChar ch = c; |
| 1155 | 1155 | ||
| 1156 | err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout); | 1156 | err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout); |
| 1157 | if (err == noErr) | 1157 | if (err == noErr |
| 1158 | && (font_ascent_return || font_descent_return || overall_return)) | ||
| 1158 | { | 1159 | { |
| 1159 | ATSTrapezoid glyph_bounds; | 1160 | ATSTrapezoid glyph_bounds; |
| 1160 | 1161 | ||
| @@ -6987,7 +6988,6 @@ static Lisp_Object fm_font_family_alist; | |||
| 6987 | static Lisp_Object atsu_font_id_hash; | 6988 | static Lisp_Object atsu_font_id_hash; |
| 6988 | /* Alist linking Font Manager style to face attributes. */ | 6989 | /* Alist linking Font Manager style to face attributes. */ |
| 6989 | static Lisp_Object fm_style_face_attributes_alist; | 6990 | static Lisp_Object fm_style_face_attributes_alist; |
| 6990 | static Lisp_Object Vmac_atsu_font_table; | ||
| 6991 | extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; | 6991 | extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; |
| 6992 | #endif | 6992 | #endif |
| 6993 | 6993 | ||
| @@ -7224,6 +7224,73 @@ add_mac_font_name (name, size, style, charset) | |||
| 7224 | } | 7224 | } |
| 7225 | 7225 | ||
| 7226 | #if USE_ATSUI | 7226 | #if USE_ATSUI |
| 7227 | static FMFontStyle | ||
| 7228 | fm_get_style_from_font (font) | ||
| 7229 | FMFont font; | ||
| 7230 | { | ||
| 7231 | OSStatus err; | ||
| 7232 | FMFontStyle style = normal; | ||
| 7233 | ByteCount len; | ||
| 7234 | UInt16 mac_style; | ||
| 7235 | FMFontFamily font_family; | ||
| 7236 | #define FONT_HEADER_MAC_STYLE_OFFSET (4*4 + 2*2 + 8*2 + 2*4) | ||
| 7237 | |||
| 7238 | /* FMGetFontFamilyInstanceFromFont returns `normal' as the style of | ||
| 7239 | some font (e.g., Optima) even if it is `bold'. */ | ||
| 7240 | err = FMGetFontTable (font, 'head', FONT_HEADER_MAC_STYLE_OFFSET, | ||
| 7241 | sizeof (mac_style), &mac_style, &len); | ||
| 7242 | if (err == noErr | ||
| 7243 | && len >= FONT_HEADER_MAC_STYLE_OFFSET + sizeof (mac_style)) | ||
| 7244 | style = EndianU16_BtoN (mac_style); | ||
| 7245 | else | ||
| 7246 | FMGetFontFamilyInstanceFromFont (font, &font_family, &style); | ||
| 7247 | |||
| 7248 | return style; | ||
| 7249 | } | ||
| 7250 | |||
| 7251 | static ATSUFontID | ||
| 7252 | atsu_find_font_from_family_name (family) | ||
| 7253 | const char *family; | ||
| 7254 | { | ||
| 7255 | struct Lisp_Hash_Table *h = XHASH_TABLE (atsu_font_id_hash); | ||
| 7256 | unsigned hash_code; | ||
| 7257 | int i; | ||
| 7258 | Lisp_Object rest, best; | ||
| 7259 | FMFontStyle min_style, style; | ||
| 7260 | |||
| 7261 | i = hash_lookup (h, make_unibyte_string (family, strlen (family)), | ||
| 7262 | &hash_code); | ||
| 7263 | if (i < 0) | ||
| 7264 | return kATSUInvalidFontID; | ||
| 7265 | |||
| 7266 | rest = HASH_VALUE (h, i); | ||
| 7267 | if (INTEGERP (rest) || (CONSP (rest) && INTEGERP (XCDR (rest)))) | ||
| 7268 | return cons_to_long (rest); | ||
| 7269 | |||
| 7270 | rest = Fnreverse (rest); | ||
| 7271 | best = XCAR (rest); | ||
| 7272 | rest = XCDR (rest); | ||
| 7273 | if (!NILP (rest) | ||
| 7274 | && (min_style = fm_get_style_from_font (cons_to_long (best))) != normal) | ||
| 7275 | do | ||
| 7276 | { | ||
| 7277 | style = fm_get_style_from_font (cons_to_long (XCAR (rest))); | ||
| 7278 | if (style < min_style) | ||
| 7279 | { | ||
| 7280 | best = XCAR (rest); | ||
| 7281 | if (style == normal) | ||
| 7282 | break; | ||
| 7283 | else | ||
| 7284 | min_style = style; | ||
| 7285 | } | ||
| 7286 | rest = XCDR (rest); | ||
| 7287 | } | ||
| 7288 | while (!NILP (rest)); | ||
| 7289 | |||
| 7290 | HASH_VALUE (h, i) = best; | ||
| 7291 | return cons_to_long (best); | ||
| 7292 | } | ||
| 7293 | |||
| 7227 | static Lisp_Object | 7294 | static Lisp_Object |
| 7228 | fm_style_to_face_attributes (fm_style) | 7295 | fm_style_to_face_attributes (fm_style) |
| 7229 | FMFontStyle fm_style; | 7296 | FMFontStyle fm_style; |
| @@ -7244,6 +7311,44 @@ fm_style_to_face_attributes (fm_style) | |||
| 7244 | 7311 | ||
| 7245 | return tem; | 7312 | return tem; |
| 7246 | } | 7313 | } |
| 7314 | |||
| 7315 | static Lisp_Object | ||
| 7316 | atsu_find_font_family_name (font_id) | ||
| 7317 | ATSUFontID font_id; | ||
| 7318 | { | ||
| 7319 | OSStatus err; | ||
| 7320 | ByteCount len; | ||
| 7321 | Lisp_Object family = Qnil; | ||
| 7322 | |||
| 7323 | err = ATSUFindFontName (font_id, kFontFamilyName, | ||
| 7324 | kFontMacintoshPlatform, kFontNoScript, | ||
| 7325 | kFontNoLanguage, 0, NULL, &len, NULL); | ||
| 7326 | if (err == noErr) | ||
| 7327 | { | ||
| 7328 | family = make_uninit_string (len); | ||
| 7329 | err = ATSUFindFontName (font_id, kFontFamilyName, | ||
| 7330 | kFontMacintoshPlatform, kFontNoScript, | ||
| 7331 | kFontNoLanguage, len, SDATA (family), | ||
| 7332 | NULL, NULL); | ||
| 7333 | } | ||
| 7334 | if (err == noErr) | ||
| 7335 | decode_mac_font_name (SDATA (family), len + 1, Qnil); | ||
| 7336 | |||
| 7337 | return family; | ||
| 7338 | } | ||
| 7339 | |||
| 7340 | Lisp_Object | ||
| 7341 | mac_atsu_font_face_attributes (font_id) | ||
| 7342 | ATSUFontID font_id; | ||
| 7343 | { | ||
| 7344 | Lisp_Object family, style_attrs; | ||
| 7345 | |||
| 7346 | family = atsu_find_font_family_name (font_id); | ||
| 7347 | if (NILP (family)) | ||
| 7348 | return Qnil; | ||
| 7349 | style_attrs = fm_style_to_face_attributes (fm_get_style_from_font (font_id)); | ||
| 7350 | return Fcons (QCfamily, Fcons (family, style_attrs)); | ||
| 7351 | } | ||
| 7247 | #endif | 7352 | #endif |
| 7248 | 7353 | ||
| 7249 | /* Sets up the table font_name_table to contain the list of all fonts | 7354 | /* Sets up the table font_name_table to contain the list of all fonts |
| @@ -7275,9 +7380,8 @@ init_font_name_table () | |||
| 7275 | unsigned hash_code; | 7380 | unsigned hash_code; |
| 7276 | ItemCount nfonts, i; | 7381 | ItemCount nfonts, i; |
| 7277 | ATSUFontID *font_ids = NULL; | 7382 | ATSUFontID *font_ids = NULL; |
| 7278 | Ptr name; | 7383 | Lisp_Object prev_family = Qnil; |
| 7279 | ByteCount name_len; | 7384 | int j; |
| 7280 | Lisp_Object family; | ||
| 7281 | 7385 | ||
| 7282 | atsu_font_id_hash = | 7386 | atsu_font_id_hash = |
| 7283 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), | 7387 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), |
| @@ -7295,41 +7399,25 @@ init_font_name_table () | |||
| 7295 | if (err == noErr) | 7399 | if (err == noErr) |
| 7296 | for (i = 0; i < nfonts; i++) | 7400 | for (i = 0; i < nfonts; i++) |
| 7297 | { | 7401 | { |
| 7298 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, | 7402 | Lisp_Object family; |
| 7299 | kFontMacintoshPlatform, kFontNoScript, | 7403 | |
| 7300 | kFontNoLanguage, 0, NULL, &name_len, NULL); | 7404 | family = atsu_find_font_family_name (font_ids[i]); |
| 7301 | if (err != noErr) | 7405 | if (NILP (family) || SREF (family, 0) == '.') |
| 7302 | continue; | 7406 | continue; |
| 7303 | name = xmalloc (name_len + 1); | 7407 | if (!NILP (Fequal (prev_family, family))) |
| 7304 | name[name_len] = '\0'; | 7408 | family = prev_family; |
| 7305 | err = ATSUFindFontName (font_ids[i], kFontFamilyName, | 7409 | else |
| 7306 | kFontMacintoshPlatform, kFontNoScript, | 7410 | j = hash_lookup (h, family, &hash_code); |
| 7307 | kFontNoLanguage, name_len, name, | 7411 | if (j < 0) |
| 7308 | NULL, NULL); | ||
| 7309 | if (err == noErr) | ||
| 7310 | { | 7412 | { |
| 7311 | FMFontFamily ff; | 7413 | add_mac_font_name (SDATA (family), 0, normal, "iso10646-1"); |
| 7312 | FMFontStyle style = normal; | 7414 | j = hash_put (h, family, Fcons (long_to_cons (font_ids[i]), |
| 7313 | 7415 | Qnil), hash_code); | |
| 7314 | decode_mac_font_name (name, name_len + 1, Qnil); | ||
| 7315 | family = make_unibyte_string (name, name_len); | ||
| 7316 | FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style); | ||
| 7317 | Fputhash ((font_ids[i] > MOST_POSITIVE_FIXNUM | ||
| 7318 | ? make_float (font_ids[i]) | ||
| 7319 | : make_number (font_ids[i])), | ||
| 7320 | Fcons (QCfamily, | ||
| 7321 | Fcons (family, | ||
| 7322 | fm_style_to_face_attributes (style))), | ||
| 7323 | Vmac_atsu_font_table); | ||
| 7324 | if (*name != '.' | ||
| 7325 | && hash_lookup (h, family, &hash_code) < 0) | ||
| 7326 | { | ||
| 7327 | add_mac_font_name (name, 0, normal, "iso10646-1"); | ||
| 7328 | hash_put (h, family, long_to_cons (font_ids[i]), | ||
| 7329 | hash_code); | ||
| 7330 | } | ||
| 7331 | } | 7416 | } |
| 7332 | xfree (name); | 7417 | else if (EQ (prev_family, family)) |
| 7418 | HASH_VALUE (h, j) = Fcons (long_to_cons (font_ids[i]), | ||
| 7419 | HASH_VALUE (h, j)); | ||
| 7420 | prev_family = family; | ||
| 7333 | } | 7421 | } |
| 7334 | if (font_ids) | 7422 | if (font_ids) |
| 7335 | xfree (font_ids); | 7423 | xfree (font_ids); |
| @@ -7873,14 +7961,11 @@ mac_load_query_font (f, fontname) | |||
| 7873 | {kAllTypographicFeaturesType, kDiacriticsType}; | 7961 | {kAllTypographicFeaturesType, kDiacriticsType}; |
| 7874 | static const ATSUFontFeatureSelector selectors[] = | 7962 | static const ATSUFontFeatureSelector selectors[] = |
| 7875 | {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; | 7963 | {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; |
| 7876 | Lisp_Object font_id_cons; | ||
| 7877 | FMFontStyle style; | 7964 | FMFontStyle style; |
| 7878 | 7965 | ||
| 7879 | font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)), | 7966 | font_id = atsu_find_font_from_family_name (family); |
| 7880 | atsu_font_id_hash, Qnil); | 7967 | if (font_id == kATSUInvalidFontID) |
| 7881 | if (NILP (font_id_cons)) | 7968 | return; |
| 7882 | return NULL; | ||
| 7883 | font_id = cons_to_long (font_id_cons); | ||
| 7884 | size_fixed = Long2Fix (size); | 7969 | size_fixed = Long2Fix (size); |
| 7885 | bold_p = (fontface & bold) != 0; | 7970 | bold_p = (fontface & bold) != 0; |
| 7886 | italic_p = (fontface & italic) != 0; | 7971 | italic_p = (fontface & italic) != 0; |
| @@ -8004,11 +8089,19 @@ mac_load_query_font (f, fontname) | |||
| 8004 | continue; | 8089 | continue; |
| 8005 | else if (c == 0x7f) | 8090 | else if (c == 0x7f) |
| 8006 | { | 8091 | { |
| 8007 | c = 0x9f; | 8092 | #if USE_CG_TEXT_DRAWING |
| 8008 | continue; | 8093 | if (font->cg_glyphs) |
| 8094 | { | ||
| 8095 | c = 0x9f; | ||
| 8096 | pcm = NULL; | ||
| 8097 | continue; | ||
| 8098 | } | ||
| 8099 | #endif | ||
| 8100 | break; | ||
| 8009 | } | 8101 | } |
| 8010 | 8102 | ||
| 8011 | mac_query_char_extents (font->mac_style, c, NULL, NULL, pcm + c, | 8103 | mac_query_char_extents (font->mac_style, c, NULL, NULL, |
| 8104 | pcm ? pcm + c : NULL, | ||
| 8012 | #if USE_CG_TEXT_DRAWING | 8105 | #if USE_CG_TEXT_DRAWING |
| 8013 | (font->cg_glyphs ? font->cg_glyphs + c | 8106 | (font->cg_glyphs ? font->cg_glyphs + c |
| 8014 | : NULL) | 8107 | : NULL) |
| @@ -8026,6 +8119,8 @@ mac_load_query_font (f, fontname) | |||
| 8026 | font->cg_font = NULL; | 8119 | font->cg_font = NULL; |
| 8027 | xfree (font->cg_glyphs); | 8120 | xfree (font->cg_glyphs); |
| 8028 | font->cg_glyphs = NULL; | 8121 | font->cg_glyphs = NULL; |
| 8122 | if (pcm == NULL) | ||
| 8123 | break; | ||
| 8029 | } | 8124 | } |
| 8030 | #endif | 8125 | #endif |
| 8031 | } | 8126 | } |
| @@ -8033,6 +8128,7 @@ mac_load_query_font (f, fontname) | |||
| 8033 | else | 8128 | else |
| 8034 | #endif | 8129 | #endif |
| 8035 | { | 8130 | { |
| 8131 | OSStatus err; | ||
| 8036 | FontInfo the_fontinfo; | 8132 | FontInfo the_fontinfo; |
| 8037 | int is_two_byte_font; | 8133 | int is_two_byte_font; |
| 8038 | 8134 | ||
| @@ -8115,8 +8211,13 @@ mac_load_query_font (f, fontname) | |||
| 8115 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); | 8211 | sizeof (XCharStruct) * (0xff - 0x20 + 1)); |
| 8116 | 8212 | ||
| 8117 | space_bounds = font->bounds.per_char; | 8213 | space_bounds = font->bounds.per_char; |
| 8118 | mac_query_char_extents (NULL, 0x20, &font->ascent, &font->descent, | 8214 | err = mac_query_char_extents (NULL, 0x20, &font->ascent, |
| 8119 | space_bounds, NULL); | 8215 | &font->descent, space_bounds, NULL); |
| 8216 | if (err != noErr || space_bounds->width <= 0) | ||
| 8217 | { | ||
| 8218 | mac_unload_font (&one_mac_display_info, font); | ||
| 8219 | return NULL; | ||
| 8220 | } | ||
| 8120 | 8221 | ||
| 8121 | for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) | 8222 | for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) |
| 8122 | mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); | 8223 | mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); |
| @@ -9365,9 +9466,7 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key, | |||
| 9365 | { | 9466 | { |
| 9366 | mac_store_apple_event (class_key, id_key, &apple_event); | 9467 | mac_store_apple_event (class_key, id_key, &apple_event); |
| 9367 | AEDisposeDesc (&apple_event); | 9468 | AEDisposeDesc (&apple_event); |
| 9368 | /* Post a harmless event so as to wake up from | 9469 | mac_wakeup_from_rne (); |
| 9369 | ReceiveNextEvent. */ | ||
| 9370 | mac_post_mouse_moved_event (); | ||
| 9371 | } | 9470 | } |
| 9372 | } | 9471 | } |
| 9373 | } | 9472 | } |
| @@ -10404,7 +10503,9 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10404 | #else | 10503 | #else |
| 10405 | FrontWindow () | 10504 | FrontWindow () |
| 10406 | #endif | 10505 | #endif |
| 10407 | != window_ptr) | 10506 | != window_ptr |
| 10507 | || (mac_window_to_frame (window_ptr) | ||
| 10508 | != dpyinfo->x_focus_frame)) | ||
| 10408 | SelectWindow (window_ptr); | 10509 | SelectWindow (window_ptr); |
| 10409 | else | 10510 | else |
| 10410 | { | 10511 | { |
| @@ -11677,7 +11778,7 @@ syms_of_macterm () | |||
| 11677 | DEFVAR_BOOL ("x-use-underline-position-properties", | 11778 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 11678 | &x_use_underline_position_properties, | 11779 | &x_use_underline_position_properties, |
| 11679 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 11780 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. |
| 11680 | nil means ignore them. If you encounter fonts with bogus | 11781 | A value of nil means ignore them. If you encounter fonts with bogus |
| 11681 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 11782 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 11682 | to 4.1, set this to nil. | 11783 | to 4.1, set this to nil. |
| 11683 | 11784 | ||
| @@ -11687,9 +11788,9 @@ NOTE: Not supported on Mac yet. */); | |||
| 11687 | DEFVAR_BOOL ("x-underline-at-descent-line", | 11788 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 11688 | &x_underline_at_descent_line, | 11789 | &x_underline_at_descent_line, |
| 11689 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 11790 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. |
| 11690 | nil means to draw the underline according to the value of the variable | 11791 | A value of nil means to draw the underline according to the value of the |
| 11691 | `x-use-underline-position-properties', which is usually at the baseline | 11792 | variable `x-use-underline-position-properties', which is usually at the |
| 11692 | level. The default value is nil. */); | 11793 | baseline level. The default value is nil. */); |
| 11693 | x_underline_at_descent_line = 0; | 11794 | x_underline_at_descent_line = 0; |
| 11694 | 11795 | ||
| 11695 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 11796 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| @@ -11736,8 +11837,8 @@ unexpected results for some keys on non-US/GB keyboards. */); | |||
| 11736 | &Vmac_emulate_three_button_mouse, | 11837 | &Vmac_emulate_three_button_mouse, |
| 11737 | doc: /* *Specify a way of three button mouse emulation. | 11838 | doc: /* *Specify a way of three button mouse emulation. |
| 11738 | The value can be nil, t, or the symbol `reverse'. | 11839 | The value can be nil, t, or the symbol `reverse'. |
| 11739 | nil means that no emulation should be done and the modifiers should be | 11840 | A value of nil means that no emulation should be done and the modifiers |
| 11740 | placed on the mouse-1 event. | 11841 | should be placed on the mouse-1 event. |
| 11741 | t means that when the option-key is held down while pressing the mouse | 11842 | t means that when the option-key is held down while pressing the mouse |
| 11742 | button, the click will register as mouse-2 and while the command-key | 11843 | button, the click will register as mouse-2 and while the command-key |
| 11743 | is held down, the click will register as mouse-3. | 11844 | is held down, the click will register as mouse-3. |
| @@ -11788,15 +11889,6 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */); | |||
| 11788 | Fcons (list3 (build_string ("mac-roman"), | 11889 | Fcons (list3 (build_string ("mac-roman"), |
| 11789 | make_number (smRoman), Qnil), Qnil); | 11890 | make_number (smRoman), Qnil), Qnil); |
| 11790 | 11891 | ||
| 11791 | #if USE_ATSUI | ||
| 11792 | DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table, | ||
| 11793 | doc: /* Hash table of ATSU font IDs vs plist of attributes and values. */); | ||
| 11794 | Vmac_atsu_font_table = | ||
| 11795 | make_hash_table (Qeql, make_number (DEFAULT_HASH_SIZE), | ||
| 11796 | make_float (DEFAULT_REHASH_SIZE), | ||
| 11797 | make_float (DEFAULT_REHASH_THRESHOLD), | ||
| 11798 | Qnil, Qnil, Qnil); | ||
| 11799 | #endif | ||
| 11800 | #if USE_MAC_TSM | 11892 | #if USE_MAC_TSM |
| 11801 | DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, | 11893 | DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, |
| 11802 | doc: /* Overlay used to display Mac TSM active input area. */); | 11894 | doc: /* Overlay used to display Mac TSM active input area. */); |
diff --git a/src/macterm.h b/src/macterm.h index 33692a8b8d2..a7e4ccff775 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -682,6 +682,7 @@ extern Lisp_Object cfdate_to_lisp P_ ((CFDateRef)); | |||
| 682 | extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef)); | 682 | extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef)); |
| 683 | extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef)); | 683 | extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef)); |
| 684 | extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int)); | 684 | extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int)); |
| 685 | extern void mac_wakeup_from_rne P_ ((void)); | ||
| 685 | #endif | 686 | #endif |
| 686 | extern void xrm_merge_string_database P_ ((XrmDatabase, const char *)); | 687 | extern void xrm_merge_string_database P_ ((XrmDatabase, const char *)); |
| 687 | extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *, | 688 | extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *, |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index c2367ba30e4..e8d30a31cc5 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -156,7 +156,7 @@ all: $(ALL) | |||
| 156 | # | 156 | # |
| 157 | # The dumped executable | 157 | # The dumped executable |
| 158 | # | 158 | # |
| 159 | emacs: $(BLD) $(EMACS) | 159 | emacs: stamp_BLD $(EMACS) |
| 160 | $(EMACS): $(DOC) $(TEMACS) | 160 | $(EMACS): $(DOC) $(TEMACS) |
| 161 | "$(THISDIR)/$(BLD)/temacs.exe" -batch -l loadup dump | 161 | "$(THISDIR)/$(BLD)/temacs.exe" -batch -l loadup dump |
| 162 | -"$(THISDIR)/$(BLD)/emacs.exe" -q -batch -f list-load-path-shadows | 162 | -"$(THISDIR)/$(BLD)/emacs.exe" -q -batch -f list-load-path-shadows |
| @@ -167,7 +167,7 @@ $(EMACS): $(DOC) $(TEMACS) | |||
| 167 | # If preload runs out of memory, increase the last argument to addsection | 167 | # If preload runs out of memory, increase the last argument to addsection |
| 168 | # (it is the preload heap size in MB). | 168 | # (it is the preload heap size in MB). |
| 169 | # | 169 | # |
| 170 | temacs: $(BLD) $(TEMACS) | 170 | temacs: stamp_BLD $(TEMACS) |
| 171 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \ | 171 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \ |
| 172 | ../nt/$(BLD)/addsection.exe | 172 | ../nt/$(BLD)/addsection.exe |
| 173 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) | 173 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) |
| @@ -185,7 +185,7 @@ bootstrap: bootstrap-emacs | |||
| 185 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as | 185 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as |
| 186 | # this can break with GNU Make 3.81 and later if sh.exe is used. | 186 | # this can break with GNU Make 3.81 and later if sh.exe is used. |
| 187 | bootstrap-temacs: | 187 | bootstrap-temacs: |
| 188 | $(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE) | 188 | $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE) |
| 189 | 189 | ||
| 190 | # | 190 | # |
| 191 | # Dump an Emacs executable named bootstrap-emacs containing the | 191 | # Dump an Emacs executable named bootstrap-emacs containing the |
| @@ -250,6 +250,7 @@ clean: | |||
| 250 | - $(DEL) *~ "s/*~" "m/*~" | 250 | - $(DEL) *~ "s/*~" "m/*~" |
| 251 | - $(DEL) $(COMPILER_TEMP_FILES) | 251 | - $(DEL) $(COMPILER_TEMP_FILES) |
| 252 | - $(DEL_TREE) $(OBJDIR) | 252 | - $(DEL_TREE) $(OBJDIR) |
| 253 | - $(DEL) stamp_BLD | ||
| 253 | 254 | ||
| 254 | distclean: clean | 255 | distclean: clean |
| 255 | - $(DEL) config.h epaths.h | 256 | - $(DEL) config.h epaths.h |
| @@ -1486,3 +1487,8 @@ $(BLD)/w32bdf.$(O): \ | |||
| 1486 | $(SRC)/w32bdf.h \ | 1487 | $(SRC)/w32bdf.h \ |
| 1487 | $(SRC)/w32gui.h \ | 1488 | $(SRC)/w32gui.h \ |
| 1488 | $(SRC)/w32term.h | 1489 | $(SRC)/w32term.h |
| 1490 | |||
| 1491 | # Each object file depends on stamp_BLD, because in parallel builds we must | ||
| 1492 | # make sure $(BLD) exists before starting compilations. | ||
| 1493 | # | ||
| 1494 | $(OBJ0) $(OBJ1) $(WIN32OBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD | ||
diff --git a/src/marker.c b/src/marker.c index 48685e7d27c..727e97900c2 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -848,7 +848,7 @@ see `marker-insertion-type'. */) | |||
| 848 | DEFUN ("marker-insertion-type", Fmarker_insertion_type, | 848 | DEFUN ("marker-insertion-type", Fmarker_insertion_type, |
| 849 | Smarker_insertion_type, 1, 1, 0, | 849 | Smarker_insertion_type, 1, 1, 0, |
| 850 | doc: /* Return insertion type of MARKER: t if it stays after inserted text. | 850 | doc: /* Return insertion type of MARKER: t if it stays after inserted text. |
| 851 | nil means the marker stays before text inserted there. */) | 851 | The value nil means the marker stays before text inserted there. */) |
| 852 | (marker) | 852 | (marker) |
| 853 | register Lisp_Object marker; | 853 | register Lisp_Object marker; |
| 854 | { | 854 | { |
diff --git a/src/minibuf.c b/src/minibuf.c index 31c0fd1768e..7b276a2e925 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1293,6 +1293,7 @@ is used to further constrain the set of candidates. */) | |||
| 1293 | tail = alist; | 1293 | tail = alist; |
| 1294 | if (type == 2) | 1294 | if (type == 2) |
| 1295 | { | 1295 | { |
| 1296 | alist = check_obarray (alist); | ||
| 1296 | obsize = XVECTOR (alist)->size; | 1297 | obsize = XVECTOR (alist)->size; |
| 1297 | bucket = XVECTOR (alist)->contents[index]; | 1298 | bucket = XVECTOR (alist)->contents[index]; |
| 1298 | } | 1299 | } |
| @@ -1316,6 +1317,8 @@ is used to further constrain the set of candidates. */) | |||
| 1316 | { | 1317 | { |
| 1317 | if (!EQ (bucket, zero)) | 1318 | if (!EQ (bucket, zero)) |
| 1318 | { | 1319 | { |
| 1320 | if (!SYMBOLP (bucket)) | ||
| 1321 | error ("Bad data in guts of obarray"); | ||
| 1319 | elt = bucket; | 1322 | elt = bucket; |
| 1320 | eltstring = elt; | 1323 | eltstring = elt; |
| 1321 | if (XSYMBOL (bucket)->next) | 1324 | if (XSYMBOL (bucket)->next) |
| @@ -2883,10 +2886,10 @@ The value may alternatively be a function, which is given three arguments: | |||
| 2883 | STRING, the current buffer contents; | 2886 | STRING, the current buffer contents; |
| 2884 | PREDICATE, the predicate for filtering possible matches; | 2887 | PREDICATE, the predicate for filtering possible matches; |
| 2885 | CODE, which says what kind of things to do. | 2888 | CODE, which says what kind of things to do. |
| 2886 | CODE can be nil, t or `lambda'. | 2889 | CODE can be nil, t or `lambda': |
| 2887 | nil means to return the best completion of STRING, or nil if there is none. | 2890 | nil -- return the best completion of STRING, or nil if there is none. |
| 2888 | t means to return a list of all possible completions of STRING. | 2891 | t -- return a list of all possible completions of STRING. |
| 2889 | `lambda' means to return t if STRING is a valid completion as it stands. */); | 2892 | lambda -- return t if STRING is a valid completion as it stands. */); |
| 2890 | Vminibuffer_completion_table = Qnil; | 2893 | Vminibuffer_completion_table = Qnil; |
| 2891 | 2894 | ||
| 2892 | DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate, | 2895 | DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate, |
diff --git a/src/msdos.c b/src/msdos.c index 834a32db97b..6413fed0014 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -5300,7 +5300,7 @@ This variable is used only by MSDOS terminals. */); | |||
| 5300 | #ifndef subprocesses | 5300 | #ifndef subprocesses |
| 5301 | DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, | 5301 | DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, |
| 5302 | doc: /* *Non-nil means delete processes immediately when they exit. | 5302 | doc: /* *Non-nil means delete processes immediately when they exit. |
| 5303 | nil means don't delete them until `list-processes' is run. */); | 5303 | A value of nil means don't delete them until `list-processes' is run. */); |
| 5304 | delete_exited_processes = 0; | 5304 | delete_exited_processes = 0; |
| 5305 | #endif | 5305 | #endif |
| 5306 | 5306 | ||
diff --git a/src/msdos.h b/src/msdos.h index 8bfbcf2d10c..cbe65818867 100644 --- a/src/msdos.h +++ b/src/msdos.h | |||
| @@ -53,7 +53,7 @@ typedef int Pixmap; | |||
| 53 | typedef int Display; | 53 | typedef int Display; |
| 54 | typedef int Window; | 54 | typedef int Window; |
| 55 | typedef int XRectangle; | 55 | typedef int XRectangle; |
| 56 | #define PIX_TYPE int | 56 | #define PIX_TYPE unsigned long |
| 57 | #define XDISPLAY | 57 | #define XDISPLAY |
| 58 | 58 | ||
| 59 | /* A stripped version of struct x_display_info in xterm.h, which see. */ | 59 | /* A stripped version of struct x_display_info in xterm.h, which see. */ |
diff --git a/src/prefix-args.c b/src/prefix-args.c index 1f2632c6913..ad634585168 100644 --- a/src/prefix-args.c +++ b/src/prefix-args.c | |||
| @@ -44,6 +44,14 @@ Boston, MA 02110-1301, USA. */ | |||
| 44 | If I can't write a completely portable program to do this in C, | 44 | If I can't write a completely portable program to do this in C, |
| 45 | I'm quitting and taking up gardening. */ | 45 | I'm quitting and taking up gardening. */ |
| 46 | 46 | ||
| 47 | #ifdef HAVE_CONFIG_H | ||
| 48 | # include <config.h> | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #if STDC_HEADERS | ||
| 52 | # include <stdlib.h> /* for proper declaration of `exit' */ | ||
| 53 | #endif | ||
| 54 | |||
| 47 | #include <stdio.h> | 55 | #include <stdio.h> |
| 48 | #include <stdlib.h> | 56 | #include <stdlib.h> |
| 49 | 57 | ||
diff --git a/src/process.c b/src/process.c index 7a8ad5c339b..f6dad808ffe 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2900,7 +2900,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2900 | /* Make QCaddress an alias for :local (server) or :remote (client). */ | 2900 | /* Make QCaddress an alias for :local (server) or :remote (client). */ |
| 2901 | QCaddress = is_server ? QClocal : QCremote; | 2901 | QCaddress = is_server ? QClocal : QCremote; |
| 2902 | 2902 | ||
| 2903 | /* :wait BOOL */ | 2903 | /* :nowait BOOL */ |
| 2904 | if (!is_server && socktype == SOCK_STREAM | 2904 | if (!is_server && socktype == SOCK_STREAM |
| 2905 | && (tem = Fplist_get (contact, QCnowait), !NILP (tem))) | 2905 | && (tem = Fplist_get (contact, QCnowait), !NILP (tem))) |
| 2906 | { | 2906 | { |
| @@ -5144,6 +5144,9 @@ read_process_output (proc, channel) | |||
| 5144 | } | 5144 | } |
| 5145 | 5145 | ||
| 5146 | carryover = nbytes - coding->consumed; | 5146 | carryover = nbytes - coding->consumed; |
| 5147 | if (carryover < 0) | ||
| 5148 | abort (); | ||
| 5149 | |||
| 5147 | if (SCHARS (p->decoding_buf) < carryover) | 5150 | if (SCHARS (p->decoding_buf) < carryover) |
| 5148 | p->decoding_buf = make_uninit_string (carryover); | 5151 | p->decoding_buf = make_uninit_string (carryover); |
| 5149 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 5152 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| @@ -5254,11 +5257,15 @@ read_process_output (proc, channel) | |||
| 5254 | } | 5257 | } |
| 5255 | } | 5258 | } |
| 5256 | carryover = nbytes - coding->consumed; | 5259 | carryover = nbytes - coding->consumed; |
| 5260 | if (carryover < 0) | ||
| 5261 | abort (); | ||
| 5262 | |||
| 5257 | if (SCHARS (p->decoding_buf) < carryover) | 5263 | if (SCHARS (p->decoding_buf) < carryover) |
| 5258 | p->decoding_buf = make_uninit_string (carryover); | 5264 | p->decoding_buf = make_uninit_string (carryover); |
| 5259 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 5265 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 5260 | carryover); | 5266 | carryover); |
| 5261 | XSETINT (p->decoding_carryover, carryover); | 5267 | XSETINT (p->decoding_carryover, carryover); |
| 5268 | |||
| 5262 | /* Adjust the multibyteness of TEXT to that of the buffer. */ | 5269 | /* Adjust the multibyteness of TEXT to that of the buffer. */ |
| 5263 | if (NILP (current_buffer->enable_multibyte_characters) | 5270 | if (NILP (current_buffer->enable_multibyte_characters) |
| 5264 | != ! STRING_MULTIBYTE (text)) | 5271 | != ! STRING_MULTIBYTE (text)) |
| @@ -6099,7 +6106,7 @@ If PROCESS is a network process, resume handling of incoming traffic. */) | |||
| 6099 | DEFUN ("signal-process", Fsignal_process, Ssignal_process, | 6106 | DEFUN ("signal-process", Fsignal_process, Ssignal_process, |
| 6100 | 2, 2, "sProcess (name or number): \nnSignal code: ", | 6107 | 2, 2, "sProcess (name or number): \nnSignal code: ", |
| 6101 | doc: /* Send PROCESS the signal with code SIGCODE. | 6108 | doc: /* Send PROCESS the signal with code SIGCODE. |
| 6102 | PROCESS may also be an integer specifying the process id of the | 6109 | PROCESS may also be a number specifying the process id of the |
| 6103 | process to signal; in this case, the process need not be a child of | 6110 | process to signal; in this case, the process need not be a child of |
| 6104 | this Emacs. | 6111 | this Emacs. |
| 6105 | SIGCODE may be an integer, or a symbol whose name is a signal name. */) | 6112 | SIGCODE may be an integer, or a symbol whose name is a signal name. */) |
| @@ -6116,7 +6123,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6116 | 6123 | ||
| 6117 | if (FLOATP (process)) | 6124 | if (FLOATP (process)) |
| 6118 | { | 6125 | { |
| 6119 | pid = (pid_t) XFLOAT (process); | 6126 | pid = (pid_t) XFLOAT_DATA (process); |
| 6120 | goto got_it; | 6127 | goto got_it; |
| 6121 | } | 6128 | } |
| 6122 | 6129 | ||
| @@ -6144,8 +6151,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6144 | 6151 | ||
| 6145 | got_it: | 6152 | got_it: |
| 6146 | 6153 | ||
| 6147 | #define handle_signal(NAME, VALUE) \ | 6154 | #define parse_signal(NAME, VALUE) \ |
| 6148 | else if (!strcmp (name, NAME)) \ | 6155 | else if (!xstricmp (name, NAME)) \ |
| 6149 | XSETINT (sigcode, VALUE) | 6156 | XSETINT (sigcode, VALUE) |
| 6150 | 6157 | ||
| 6151 | if (INTEGERP (sigcode)) | 6158 | if (INTEGERP (sigcode)) |
| @@ -6157,106 +6164,106 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6157 | CHECK_SYMBOL (sigcode); | 6164 | CHECK_SYMBOL (sigcode); |
| 6158 | name = SDATA (SYMBOL_NAME (sigcode)); | 6165 | name = SDATA (SYMBOL_NAME (sigcode)); |
| 6159 | 6166 | ||
| 6160 | if (!strncmp(name, "SIG", 3)) | 6167 | if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3)) |
| 6161 | name += 3; | 6168 | name += 3; |
| 6162 | 6169 | ||
| 6163 | if (0) | 6170 | if (0) |
| 6164 | ; | 6171 | ; |
| 6172 | #ifdef SIGUSR1 | ||
| 6173 | parse_signal ("usr1", SIGUSR1); | ||
| 6174 | #endif | ||
| 6175 | #ifdef SIGUSR2 | ||
| 6176 | parse_signal ("usr2", SIGUSR2); | ||
| 6177 | #endif | ||
| 6178 | #ifdef SIGTERM | ||
| 6179 | parse_signal ("term", SIGTERM); | ||
| 6180 | #endif | ||
| 6165 | #ifdef SIGHUP | 6181 | #ifdef SIGHUP |
| 6166 | handle_signal ("HUP", SIGHUP); | 6182 | parse_signal ("hup", SIGHUP); |
| 6167 | #endif | 6183 | #endif |
| 6168 | #ifdef SIGINT | 6184 | #ifdef SIGINT |
| 6169 | handle_signal ("INT", SIGINT); | 6185 | parse_signal ("int", SIGINT); |
| 6170 | #endif | 6186 | #endif |
| 6171 | #ifdef SIGQUIT | 6187 | #ifdef SIGQUIT |
| 6172 | handle_signal ("QUIT", SIGQUIT); | 6188 | parse_signal ("quit", SIGQUIT); |
| 6173 | #endif | 6189 | #endif |
| 6174 | #ifdef SIGILL | 6190 | #ifdef SIGILL |
| 6175 | handle_signal ("ILL", SIGILL); | 6191 | parse_signal ("ill", SIGILL); |
| 6176 | #endif | 6192 | #endif |
| 6177 | #ifdef SIGABRT | 6193 | #ifdef SIGABRT |
| 6178 | handle_signal ("ABRT", SIGABRT); | 6194 | parse_signal ("abrt", SIGABRT); |
| 6179 | #endif | 6195 | #endif |
| 6180 | #ifdef SIGEMT | 6196 | #ifdef SIGEMT |
| 6181 | handle_signal ("EMT", SIGEMT); | 6197 | parse_signal ("emt", SIGEMT); |
| 6182 | #endif | 6198 | #endif |
| 6183 | #ifdef SIGKILL | 6199 | #ifdef SIGKILL |
| 6184 | handle_signal ("KILL", SIGKILL); | 6200 | parse_signal ("kill", SIGKILL); |
| 6185 | #endif | 6201 | #endif |
| 6186 | #ifdef SIGFPE | 6202 | #ifdef SIGFPE |
| 6187 | handle_signal ("FPE", SIGFPE); | 6203 | parse_signal ("fpe", SIGFPE); |
| 6188 | #endif | 6204 | #endif |
| 6189 | #ifdef SIGBUS | 6205 | #ifdef SIGBUS |
| 6190 | handle_signal ("BUS", SIGBUS); | 6206 | parse_signal ("bus", SIGBUS); |
| 6191 | #endif | 6207 | #endif |
| 6192 | #ifdef SIGSEGV | 6208 | #ifdef SIGSEGV |
| 6193 | handle_signal ("SEGV", SIGSEGV); | 6209 | parse_signal ("segv", SIGSEGV); |
| 6194 | #endif | 6210 | #endif |
| 6195 | #ifdef SIGSYS | 6211 | #ifdef SIGSYS |
| 6196 | handle_signal ("SYS", SIGSYS); | 6212 | parse_signal ("sys", SIGSYS); |
| 6197 | #endif | 6213 | #endif |
| 6198 | #ifdef SIGPIPE | 6214 | #ifdef SIGPIPE |
| 6199 | handle_signal ("PIPE", SIGPIPE); | 6215 | parse_signal ("pipe", SIGPIPE); |
| 6200 | #endif | 6216 | #endif |
| 6201 | #ifdef SIGALRM | 6217 | #ifdef SIGALRM |
| 6202 | handle_signal ("ALRM", SIGALRM); | 6218 | parse_signal ("alrm", SIGALRM); |
| 6203 | #endif | ||
| 6204 | #ifdef SIGTERM | ||
| 6205 | handle_signal ("TERM", SIGTERM); | ||
| 6206 | #endif | 6219 | #endif |
| 6207 | #ifdef SIGURG | 6220 | #ifdef SIGURG |
| 6208 | handle_signal ("URG", SIGURG); | 6221 | parse_signal ("urg", SIGURG); |
| 6209 | #endif | 6222 | #endif |
| 6210 | #ifdef SIGSTOP | 6223 | #ifdef SIGSTOP |
| 6211 | handle_signal ("STOP", SIGSTOP); | 6224 | parse_signal ("stop", SIGSTOP); |
| 6212 | #endif | 6225 | #endif |
| 6213 | #ifdef SIGTSTP | 6226 | #ifdef SIGTSTP |
| 6214 | handle_signal ("TSTP", SIGTSTP); | 6227 | parse_signal ("tstp", SIGTSTP); |
| 6215 | #endif | 6228 | #endif |
| 6216 | #ifdef SIGCONT | 6229 | #ifdef SIGCONT |
| 6217 | handle_signal ("CONT", SIGCONT); | 6230 | parse_signal ("cont", SIGCONT); |
| 6218 | #endif | 6231 | #endif |
| 6219 | #ifdef SIGCHLD | 6232 | #ifdef SIGCHLD |
| 6220 | handle_signal ("CHLD", SIGCHLD); | 6233 | parse_signal ("chld", SIGCHLD); |
| 6221 | #endif | 6234 | #endif |
| 6222 | #ifdef SIGTTIN | 6235 | #ifdef SIGTTIN |
| 6223 | handle_signal ("TTIN", SIGTTIN); | 6236 | parse_signal ("ttin", SIGTTIN); |
| 6224 | #endif | 6237 | #endif |
| 6225 | #ifdef SIGTTOU | 6238 | #ifdef SIGTTOU |
| 6226 | handle_signal ("TTOU", SIGTTOU); | 6239 | parse_signal ("ttou", SIGTTOU); |
| 6227 | #endif | 6240 | #endif |
| 6228 | #ifdef SIGIO | 6241 | #ifdef SIGIO |
| 6229 | handle_signal ("IO", SIGIO); | 6242 | parse_signal ("io", SIGIO); |
| 6230 | #endif | 6243 | #endif |
| 6231 | #ifdef SIGXCPU | 6244 | #ifdef SIGXCPU |
| 6232 | handle_signal ("XCPU", SIGXCPU); | 6245 | parse_signal ("xcpu", SIGXCPU); |
| 6233 | #endif | 6246 | #endif |
| 6234 | #ifdef SIGXFSZ | 6247 | #ifdef SIGXFSZ |
| 6235 | handle_signal ("XFSZ", SIGXFSZ); | 6248 | parse_signal ("xfsz", SIGXFSZ); |
| 6236 | #endif | 6249 | #endif |
| 6237 | #ifdef SIGVTALRM | 6250 | #ifdef SIGVTALRM |
| 6238 | handle_signal ("VTALRM", SIGVTALRM); | 6251 | parse_signal ("vtalrm", SIGVTALRM); |
| 6239 | #endif | 6252 | #endif |
| 6240 | #ifdef SIGPROF | 6253 | #ifdef SIGPROF |
| 6241 | handle_signal ("PROF", SIGPROF); | 6254 | parse_signal ("prof", SIGPROF); |
| 6242 | #endif | 6255 | #endif |
| 6243 | #ifdef SIGWINCH | 6256 | #ifdef SIGWINCH |
| 6244 | handle_signal ("WINCH", SIGWINCH); | 6257 | parse_signal ("winch", SIGWINCH); |
| 6245 | #endif | 6258 | #endif |
| 6246 | #ifdef SIGINFO | 6259 | #ifdef SIGINFO |
| 6247 | handle_signal ("INFO", SIGINFO); | 6260 | parse_signal ("info", SIGINFO); |
| 6248 | #endif | ||
| 6249 | #ifdef SIGUSR1 | ||
| 6250 | handle_signal ("USR1", SIGUSR1); | ||
| 6251 | #endif | ||
| 6252 | #ifdef SIGUSR2 | ||
| 6253 | handle_signal ("USR2", SIGUSR2); | ||
| 6254 | #endif | 6261 | #endif |
| 6255 | else | 6262 | else |
| 6256 | error ("Undefined signal name %s", name); | 6263 | error ("Undefined signal name %s", name); |
| 6257 | } | 6264 | } |
| 6258 | 6265 | ||
| 6259 | #undef handle_signal | 6266 | #undef parse_signal |
| 6260 | 6267 | ||
| 6261 | return make_number (kill (pid, XINT (sigcode))); | 6268 | return make_number (kill (pid, XINT (sigcode))); |
| 6262 | } | 6269 | } |
diff --git a/src/regex.c b/src/regex.c index c0dd6e00ffc..b1307743f0f 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -67,8 +67,8 @@ | |||
| 67 | # define regfree(preg) __regfree (preg) | 67 | # define regfree(preg) __regfree (preg) |
| 68 | # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) | 68 | # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) |
| 69 | # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) | 69 | # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) |
| 70 | # define regerror(errcode, preg, errbuf, errbuf_size) \ | 70 | # define regerror(err_code, preg, errbuf, errbuf_size) \ |
| 71 | __regerror(errcode, preg, errbuf, errbuf_size) | 71 | __regerror(err_code, preg, errbuf, errbuf_size) |
| 72 | # define re_set_registers(bu, re, nu, st, en) \ | 72 | # define re_set_registers(bu, re, nu, st, en) \ |
| 73 | __re_set_registers (bu, re, nu, st, en) | 73 | __re_set_registers (bu, re, nu, st, en) |
| 74 | # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ | 74 | # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ |
| @@ -6531,12 +6531,15 @@ regexec (preg, string, nmatch, pmatch, eflags) | |||
| 6531 | WEAK_ALIAS (__regexec, regexec) | 6531 | WEAK_ALIAS (__regexec, regexec) |
| 6532 | 6532 | ||
| 6533 | 6533 | ||
| 6534 | /* Returns a message corresponding to an error code, ERRCODE, returned | 6534 | /* Returns a message corresponding to an error code, ERR_CODE, returned |
| 6535 | from either regcomp or regexec. We don't use PREG here. */ | 6535 | from either regcomp or regexec. We don't use PREG here. |
| 6536 | |||
| 6537 | ERR_CODE was previously called ERRCODE, but that name causes an | ||
| 6538 | error with msvc8 compiler. */ | ||
| 6536 | 6539 | ||
| 6537 | size_t | 6540 | size_t |
| 6538 | regerror (errcode, preg, errbuf, errbuf_size) | 6541 | regerror (err_code, preg, errbuf, errbuf_size) |
| 6539 | int errcode; | 6542 | int err_code; |
| 6540 | const regex_t *preg; | 6543 | const regex_t *preg; |
| 6541 | char *errbuf; | 6544 | char *errbuf; |
| 6542 | size_t errbuf_size; | 6545 | size_t errbuf_size; |
| @@ -6544,15 +6547,15 @@ regerror (errcode, preg, errbuf, errbuf_size) | |||
| 6544 | const char *msg; | 6547 | const char *msg; |
| 6545 | size_t msg_size; | 6548 | size_t msg_size; |
| 6546 | 6549 | ||
| 6547 | if (errcode < 0 | 6550 | if (err_code < 0 |
| 6548 | || errcode >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0]))) | 6551 | || err_code >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0]))) |
| 6549 | /* Only error codes returned by the rest of the code should be passed | 6552 | /* Only error codes returned by the rest of the code should be passed |
| 6550 | to this routine. If we are given anything else, or if other regex | 6553 | to this routine. If we are given anything else, or if other regex |
| 6551 | code generates an invalid error code, then the program has a bug. | 6554 | code generates an invalid error code, then the program has a bug. |
| 6552 | Dump core so we can fix it. */ | 6555 | Dump core so we can fix it. */ |
| 6553 | abort (); | 6556 | abort (); |
| 6554 | 6557 | ||
| 6555 | msg = gettext (re_error_msgid[errcode]); | 6558 | msg = gettext (re_error_msgid[err_code]); |
| 6556 | 6559 | ||
| 6557 | msg_size = strlen (msg) + 1; /* Includes the null. */ | 6560 | msg_size = strlen (msg) + 1; /* Includes the null. */ |
| 6558 | 6561 | ||
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 461df7acfba..06b1f8960f0 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -137,6 +137,16 @@ Boston, MA 02110-1301, USA. */ | |||
| 137 | 137 | ||
| 138 | #define HAVE_SOCKETS 1 | 138 | #define HAVE_SOCKETS 1 |
| 139 | 139 | ||
| 140 | /* But our select implementation doesn't allow us to make non-blocking | ||
| 141 | connects. So until that is fixed, this is necessary: */ | ||
| 142 | |||
| 143 | #define BROKEN_NON_BLOCKING_CONNECT 1 | ||
| 144 | |||
| 145 | /* And the select implementation does 1-byte read-ahead waiting | ||
| 146 | for received packets, so datagrams are broken too. */ | ||
| 147 | |||
| 148 | #define BROKEN_DATAGRAM_SOCKETS 1 | ||
| 149 | |||
| 140 | /* Define this symbol if your system has the functions bcopy, etc. */ | 150 | /* Define this symbol if your system has the functions bcopy, etc. */ |
| 141 | 151 | ||
| 142 | #define BSTRING | 152 | #define BSTRING |
| @@ -376,7 +386,6 @@ typedef int pid_t; | |||
| 376 | #define pclose _pclose | 386 | #define pclose _pclose |
| 377 | #define putw _putw | 387 | #define putw _putw |
| 378 | #define umask _umask | 388 | #define umask _umask |
| 379 | #define utime _utime | ||
| 380 | #define utimbuf _utimbuf | 389 | #define utimbuf _utimbuf |
| 381 | #define index strchr | 390 | #define index strchr |
| 382 | #define rindex strrchr | 391 | #define rindex strrchr |
| @@ -385,7 +394,11 @@ typedef int pid_t; | |||
| 385 | #define strnicmp _strnicmp | 394 | #define strnicmp _strnicmp |
| 386 | #define stricmp _stricmp | 395 | #define stricmp _stricmp |
| 387 | #define tzset _tzset | 396 | #define tzset _tzset |
| 397 | |||
| 398 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | ||
| 388 | #define tzname _tzname | 399 | #define tzname _tzname |
| 400 | #define utime _utime | ||
| 401 | #endif | ||
| 389 | 402 | ||
| 390 | #ifdef HAVE_NTGUI | 403 | #ifdef HAVE_NTGUI |
| 391 | #define abort w32_abort | 404 | #define abort w32_abort |
diff --git a/src/search.c b/src/search.c index d6572c5397a..3fc3faeda98 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2165,8 +2165,8 @@ DEFUN ("search-forward", Fsearch_forward, Ssearch_forward, 1, 4, "MSearch: ", | |||
| 2165 | doc: /* Search forward from point for STRING. | 2165 | doc: /* Search forward from point for STRING. |
| 2166 | Set point to the end of the occurrence found, and return point. | 2166 | Set point to the end of the occurrence found, and return point. |
| 2167 | An optional second argument bounds the search; it is a buffer position. | 2167 | An optional second argument bounds the search; it is a buffer position. |
| 2168 | The match found must not extend after that position. nil is equivalent | 2168 | The match found must not extend after that position. A value of nil is |
| 2169 | to (point-max). | 2169 | equivalent to (point-max). |
| 2170 | Optional third argument, if t, means if fail just return nil (no error). | 2170 | Optional third argument, if t, means if fail just return nil (no error). |
| 2171 | If not nil and not t, move to limit of search and return nil. | 2171 | If not nil and not t, move to limit of search and return nil. |
| 2172 | Optional fourth argument is repeat count--search for successive occurrences. | 2172 | Optional fourth argument is repeat count--search for successive occurrences. |
diff --git a/src/sound.c b/src/sound.c index 6f8e3ecb308..b6f5ff513ee 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -74,8 +74,12 @@ Boston, MA 02110-1301, USA. */ | |||
| 74 | #include <soundcard.h> | 74 | #include <soundcard.h> |
| 75 | #endif | 75 | #endif |
| 76 | #ifdef HAVE_ALSA | 76 | #ifdef HAVE_ALSA |
| 77 | #ifdef ALSA_SUBDIR_INCLUDE | ||
| 78 | #include <alsa/asoundlib.h> | ||
| 79 | #else | ||
| 77 | #include <asoundlib.h> | 80 | #include <asoundlib.h> |
| 78 | #endif | 81 | #endif /* ALSA_SUBDIR_INCLUDE */ |
| 82 | #endif /* HAVE_ALSA */ | ||
| 79 | 83 | ||
| 80 | /* END: Non Windows Includes */ | 84 | /* END: Non Windows Includes */ |
| 81 | 85 | ||
diff --git a/src/syntax.c b/src/syntax.c index 55f73d6d106..52527a0516d 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -915,7 +915,7 @@ DEFUN ("string-to-syntax", Fstring_to_syntax, Sstring_to_syntax, 1, 1, 0, | |||
| 915 | doc: /* Convert a syntax specification STRING into syntax cell form. | 915 | doc: /* Convert a syntax specification STRING into syntax cell form. |
| 916 | STRING should be a string as it is allowed as argument of | 916 | STRING should be a string as it is allowed as argument of |
| 917 | `modify-syntax-entry'. Value is the equivalent cons cell | 917 | `modify-syntax-entry'. Value is the equivalent cons cell |
| 918 | (CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' | 918 | \(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' |
| 919 | text property. */) | 919 | text property. */) |
| 920 | (string) | 920 | (string) |
| 921 | Lisp_Object string; | 921 | Lisp_Object string; |
| @@ -3046,7 +3046,7 @@ Fourth arg STOPBEFORE non-nil means stop when come to | |||
| 3046 | any character that starts a sexp. | 3046 | any character that starts a sexp. |
| 3047 | Fifth arg OLDSTATE is a list like what this function returns. | 3047 | Fifth arg OLDSTATE is a list like what this function returns. |
| 3048 | It is used to initialize the state of the parse. Elements number 1, 2, 6 | 3048 | It is used to initialize the state of the parse. Elements number 1, 2, 6 |
| 3049 | and 8 are ignored; you can leave off element 8 (the last) entirely. | 3049 | and 8 are ignored. |
| 3050 | Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. | 3050 | Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. |
| 3051 | If it is symbol `syntax-table', stop after the start of a comment or a | 3051 | If it is symbol `syntax-table', stop after the start of a comment or a |
| 3052 | string, or after end of a comment or a string. */) | 3052 | string, or after end of a comment or a string. */) |
diff --git a/src/systime.h b/src/systime.h index 00373b257b3..e7ff2b2a3b7 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -101,16 +101,8 @@ extern time_t timezone; | |||
| 101 | #ifdef GETTIMEOFDAY_ONE_ARGUMENT | 101 | #ifdef GETTIMEOFDAY_ONE_ARGUMENT |
| 102 | #define EMACS_GET_TIME(time) gettimeofday (&(time)) | 102 | #define EMACS_GET_TIME(time) gettimeofday (&(time)) |
| 103 | #else /* not GETTIMEOFDAY_ONE_ARGUMENT */ | 103 | #else /* not GETTIMEOFDAY_ONE_ARGUMENT */ |
| 104 | #ifdef HAVE_STRUCT_TIMEZONE | ||
| 105 | #define EMACS_GET_TIME(time) \ | ||
| 106 | do { \ | ||
| 107 | struct timezone dummy; \ | ||
| 108 | gettimeofday (&(time), &dummy); \ | ||
| 109 | } while (0) | ||
| 110 | #else | ||
| 111 | /* Presumably the second arg is ignored. */ | 104 | /* Presumably the second arg is ignored. */ |
| 112 | #define EMACS_GET_TIME(time) gettimeofday (&(time), NULL) | 105 | #define EMACS_GET_TIME(time) gettimeofday (&(time), NULL) |
| 113 | #endif /* HAVE_STRUCT_TIMEZONE */ | ||
| 114 | #endif /* not GETTIMEOFDAY_ONE_ARGUMENT */ | 106 | #endif /* not GETTIMEOFDAY_ONE_ARGUMENT */ |
| 115 | 107 | ||
| 116 | #define EMACS_ADD_TIME(dest, src1, src2) \ | 108 | #define EMACS_ADD_TIME(dest, src1, src2) \ |
| @@ -153,7 +153,8 @@ typedef PSID_IDENTIFIER_AUTHORITY (WINAPI * GetSidIdentifierAuthority_Proc) ( | |||
| 153 | PSID pSid); | 153 | PSID pSid); |
| 154 | 154 | ||
| 155 | /* ** A utility function ** */ | 155 | /* ** A utility function ** */ |
| 156 | static BOOL is_windows_9x () | 156 | static BOOL |
| 157 | is_windows_9x () | ||
| 157 | { | 158 | { |
| 158 | static BOOL s_b_ret=0; | 159 | static BOOL s_b_ret=0; |
| 159 | OSVERSIONINFO os_ver; | 160 | OSVERSIONINFO os_ver; |
| @@ -2871,7 +2872,8 @@ int h_errno = 0; | |||
| 2871 | /* function to set h_errno for compatability; map winsock error codes to | 2872 | /* function to set h_errno for compatability; map winsock error codes to |
| 2872 | normal system codes where they overlap (non-overlapping definitions | 2873 | normal system codes where they overlap (non-overlapping definitions |
| 2873 | are already in <sys/socket.h> */ | 2874 | are already in <sys/socket.h> */ |
| 2874 | static void set_errno () | 2875 | static void |
| 2876 | set_errno () | ||
| 2875 | { | 2877 | { |
| 2876 | if (winsock_lib == NULL) | 2878 | if (winsock_lib == NULL) |
| 2877 | h_errno = EINVAL; | 2879 | h_errno = EINVAL; |
| @@ -2892,7 +2894,8 @@ static void set_errno () | |||
| 2892 | errno = h_errno; | 2894 | errno = h_errno; |
| 2893 | } | 2895 | } |
| 2894 | 2896 | ||
| 2895 | static void check_errno () | 2897 | static void |
| 2898 | check_errno () | ||
| 2896 | { | 2899 | { |
| 2897 | if (h_errno == 0 && winsock_lib != NULL) | 2900 | if (h_errno == 0 && winsock_lib != NULL) |
| 2898 | pfn_WSASetLastError (0); | 2901 | pfn_WSASetLastError (0); |
| @@ -3676,7 +3679,8 @@ _sys_read_ahead (int fd) | |||
| 3676 | return cp->status; | 3679 | return cp->status; |
| 3677 | } | 3680 | } |
| 3678 | 3681 | ||
| 3679 | int _sys_wait_accept (int fd) | 3682 | int |
| 3683 | _sys_wait_accept (int fd) | ||
| 3680 | { | 3684 | { |
| 3681 | HANDLE hEv; | 3685 | HANDLE hEv; |
| 3682 | child_process * cp; | 3686 | child_process * cp; |
| @@ -3698,10 +3702,10 @@ int _sys_wait_accept (int fd) | |||
| 3698 | { | 3702 | { |
| 3699 | rc = WaitForSingleObject (hEv, INFINITE); | 3703 | rc = WaitForSingleObject (hEv, INFINITE); |
| 3700 | pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0); | 3704 | pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0); |
| 3701 | pfn_WSACloseEvent (hEv); | ||
| 3702 | if (rc == WAIT_OBJECT_0) | 3705 | if (rc == WAIT_OBJECT_0) |
| 3703 | cp->status = STATUS_READ_SUCCEEDED; | 3706 | cp->status = STATUS_READ_SUCCEEDED; |
| 3704 | } | 3707 | } |
| 3708 | pfn_WSACloseEvent (hEv); | ||
| 3705 | 3709 | ||
| 3706 | return cp->status; | 3710 | return cp->status; |
| 3707 | } | 3711 | } |
| @@ -4127,7 +4131,7 @@ BOOL WINAPI shutdown_handler(DWORD type) | |||
| 4127 | shut_down_emacs (0, 0, Qnil); | 4131 | shut_down_emacs (0, 0, Qnil); |
| 4128 | } | 4132 | } |
| 4129 | 4133 | ||
| 4130 | /* Allow other handlers to handle this signal. */ | 4134 | /* Allow other handlers to handle this signal. */ |
| 4131 | return FALSE; | 4135 | return FALSE; |
| 4132 | } | 4136 | } |
| 4133 | 4137 | ||
| @@ -4136,7 +4140,8 @@ BOOL WINAPI shutdown_handler(DWORD type) | |||
| 4136 | must always be initialized on startup even when the global variable | 4140 | must always be initialized on startup even when the global variable |
| 4137 | initialized is non zero (see the function main in emacs.c). | 4141 | initialized is non zero (see the function main in emacs.c). |
| 4138 | */ | 4142 | */ |
| 4139 | void globals_of_w32 () | 4143 | void |
| 4144 | globals_of_w32 () | ||
| 4140 | { | 4145 | { |
| 4141 | g_b_init_is_windows_9x = 0; | 4146 | g_b_init_is_windows_9x = 0; |
| 4142 | g_b_init_open_process_token = 0; | 4147 | g_b_init_open_process_token = 0; |
diff --git a/src/w32fns.c b/src/w32fns.c index 6313afe7867..34cfb0a2882 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3706,8 +3706,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3706 | However for top/left sizing we will need to fix the X | 3706 | However for top/left sizing we will need to fix the X |
| 3707 | and Y positions as well. */ | 3707 | and Y positions as well. */ |
| 3708 | 3708 | ||
| 3709 | lppos->cx -= wdiff; | 3709 | int cx_mintrack = GetSystemMetrics (SM_CXMINTRACK); |
| 3710 | lppos->cy -= hdiff; | 3710 | int cy_mintrack = GetSystemMetrics (SM_CYMINTRACK); |
| 3711 | |||
| 3712 | lppos->cx = max (lppos->cx - wdiff, cx_mintrack); | ||
| 3713 | lppos->cy = max (lppos->cy - hdiff, cy_mintrack); | ||
| 3711 | 3714 | ||
| 3712 | if (wp.showCmd != SW_SHOWMAXIMIZED | 3715 | if (wp.showCmd != SW_SHOWMAXIMIZED |
| 3713 | && (lppos->flags & SWP_NOMOVE) == 0) | 3716 | && (lppos->flags & SWP_NOMOVE) == 0) |
| @@ -3731,9 +3734,6 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3731 | goto dflt; | 3734 | goto dflt; |
| 3732 | 3735 | ||
| 3733 | case WM_GETMINMAXINFO: | 3736 | case WM_GETMINMAXINFO: |
| 3734 | /* Hack to correct bug that allows Emacs frames to be resized | ||
| 3735 | below the Minimum Tracking Size. */ | ||
| 3736 | ((LPMINMAXINFO) lParam)->ptMinTrackSize.y++; | ||
| 3737 | /* Hack to allow resizing the Emacs frame above the screen size. | 3737 | /* Hack to allow resizing the Emacs frame above the screen size. |
| 3738 | Note that Windows 9x limits coordinates to 16-bits. */ | 3738 | Note that Windows 9x limits coordinates to 16-bits. */ |
| 3739 | ((LPMINMAXINFO) lParam)->ptMaxTrackSize.x = 32767; | 3739 | ((LPMINMAXINFO) lParam)->ptMaxTrackSize.x = 32767; |
| @@ -8349,6 +8349,30 @@ is set to off if the low bit of NEW-STATE is zero, otherwise on. */) | |||
| 8349 | } | 8349 | } |
| 8350 | return Qnil; | 8350 | return Qnil; |
| 8351 | } | 8351 | } |
| 8352 | |||
| 8353 | DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p, | ||
| 8354 | 2, 2, 0, | ||
| 8355 | doc: /* Return non-nil if a window exists with the specified CLASS and NAME. | ||
| 8356 | |||
| 8357 | This is a direct interface to the Windows API FindWindow function. */) | ||
| 8358 | (class, name) | ||
| 8359 | Lisp_Object class, name; | ||
| 8360 | { | ||
| 8361 | HWND hnd; | ||
| 8362 | |||
| 8363 | if (!NILP (class)) | ||
| 8364 | CHECK_STRING (class); | ||
| 8365 | if (!NILP (name)) | ||
| 8366 | CHECK_STRING (name); | ||
| 8367 | |||
| 8368 | hnd = FindWindow (STRINGP (class) ? ((LPCTSTR) SDATA (class)) : NULL, | ||
| 8369 | STRINGP (name) ? ((LPCTSTR) SDATA (name)) : NULL); | ||
| 8370 | if (!hnd) | ||
| 8371 | return Qnil; | ||
| 8372 | return Qt; | ||
| 8373 | } | ||
| 8374 | |||
| 8375 | |||
| 8352 | 8376 | ||
| 8353 | DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, | 8377 | DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, |
| 8354 | doc: /* Return storage information about the file system FILENAME is on. | 8378 | doc: /* Return storage information about the file system FILENAME is on. |
| @@ -8915,6 +8939,7 @@ versions of Windows) characters. */); | |||
| 8915 | 8939 | ||
| 8916 | staticpro (&Qw32_charset_unicode); | 8940 | staticpro (&Qw32_charset_unicode); |
| 8917 | Qw32_charset_unicode = intern ("w32-charset-unicode"); | 8941 | Qw32_charset_unicode = intern ("w32-charset-unicode"); |
| 8942 | } | ||
| 8918 | #endif | 8943 | #endif |
| 8919 | 8944 | ||
| 8920 | #if 0 /* TODO: Port to W32 */ | 8945 | #if 0 /* TODO: Port to W32 */ |
| @@ -8959,6 +8984,7 @@ versions of Windows) characters. */); | |||
| 8959 | defsubr (&Sw32_registered_hot_keys); | 8984 | defsubr (&Sw32_registered_hot_keys); |
| 8960 | defsubr (&Sw32_reconstruct_hot_key); | 8985 | defsubr (&Sw32_reconstruct_hot_key); |
| 8961 | defsubr (&Sw32_toggle_lock_key); | 8986 | defsubr (&Sw32_toggle_lock_key); |
| 8987 | defsubr (&Sw32_window_exists_p); | ||
| 8962 | defsubr (&Sw32_find_bdf_fonts); | 8988 | defsubr (&Sw32_find_bdf_fonts); |
| 8963 | 8989 | ||
| 8964 | defsubr (&Sfile_system_info); | 8990 | defsubr (&Sfile_system_info); |
diff --git a/src/w32term.c b/src/w32term.c index bd3db15e11a..007f9d83afb 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6517,7 +6517,7 @@ the cursor have no effect. */); | |||
| 6517 | DEFVAR_BOOL ("x-use-underline-position-properties", | 6517 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 6518 | &x_use_underline_position_properties, | 6518 | &x_use_underline_position_properties, |
| 6519 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 6519 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. |
| 6520 | nil means ignore them. If you encounter fonts with bogus | 6520 | A value of nil means ignore them. If you encounter fonts with bogus |
| 6521 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 6521 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 6522 | to 4.1, set this to nil. | 6522 | to 4.1, set this to nil. |
| 6523 | 6523 | ||
| @@ -6527,9 +6527,9 @@ NOTE: Not supported on MS-Windows yet. */); | |||
| 6527 | DEFVAR_BOOL ("x-underline-at-descent-line", | 6527 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 6528 | &x_underline_at_descent_line, | 6528 | &x_underline_at_descent_line, |
| 6529 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 6529 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. |
| 6530 | nil means to draw the underline according to the value of the variable | 6530 | A value of nil means to draw the underline according to the value of the |
| 6531 | `x-use-underline-position-properties', which is usually at the baseline | 6531 | variable `x-use-underline-position-properties', which is usually at the |
| 6532 | level. The default value is nil. */); | 6532 | baseline level. The default value is nil. */); |
| 6533 | x_underline_at_descent_line = 0; | 6533 | x_underline_at_descent_line = 0; |
| 6534 | 6534 | ||
| 6535 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 6535 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
diff --git a/src/window.c b/src/window.c index 1576ed16c8f..b34cc3659c1 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5729,8 +5729,10 @@ With prefix argument ARG, recenter putting point on screen line ARG | |||
| 5729 | relative to the current window. If ARG is negative, it counts up from the | 5729 | relative to the current window. If ARG is negative, it counts up from the |
| 5730 | bottom of the window. (ARG should be less than the height of the window.) | 5730 | bottom of the window. (ARG should be less than the height of the window.) |
| 5731 | 5731 | ||
| 5732 | If ARG is omitted or nil, erase the entire frame and then | 5732 | If ARG is omitted or nil, erase the entire frame and then redraw with point |
| 5733 | redraw with point in the center of the current window. | 5733 | in the center of the current window. If `auto-resize-tool-bars' is set to |
| 5734 | `grow-only', this resets the tool-bar's height to the minimum height needed. | ||
| 5735 | |||
| 5734 | Just C-u as prefix means put point in the center of the window | 5736 | Just C-u as prefix means put point in the center of the window |
| 5735 | and redisplay normally--don't erase and redraw the frame. */) | 5737 | and redisplay normally--don't erase and redraw the frame. */) |
| 5736 | (arg) | 5738 | (arg) |
| @@ -5755,8 +5757,10 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5755 | for (i = 0; i < n_compositions; i++) | 5757 | for (i = 0; i < n_compositions; i++) |
| 5756 | composition_table[i]->font = NULL; | 5758 | composition_table[i]->font = NULL; |
| 5757 | 5759 | ||
| 5758 | Fredraw_frame (w->frame); | 5760 | WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1; |
| 5759 | SET_FRAME_GARBAGED (XFRAME (WINDOW_FRAME (w))); | 5761 | |
| 5762 | Fredraw_frame (WINDOW_FRAME (w)); | ||
| 5763 | SET_FRAME_GARBAGED (WINDOW_XFRAME (w)); | ||
| 5760 | center_p = 1; | 5764 | center_p = 1; |
| 5761 | } | 5765 | } |
| 5762 | else if (CONSP (arg)) /* Just C-u. */ | 5766 | else if (CONSP (arg)) /* Just C-u. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 0928d011a61..a007cd52236 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -283,10 +283,12 @@ Lisp_Object Vtool_bar_button_margin; | |||
| 283 | 283 | ||
| 284 | EMACS_INT tool_bar_button_relief; | 284 | EMACS_INT tool_bar_button_relief; |
| 285 | 285 | ||
| 286 | /* Non-zero means automatically resize tool-bars so that all tool-bar | 286 | /* Non-nil means automatically resize tool-bars so that all tool-bar |
| 287 | items are visible, and no blank lines remain. */ | 287 | items are visible, and no blank lines remain. |
| 288 | 288 | ||
| 289 | int auto_resize_tool_bars_p; | 289 | If value is `grow-only', only make tool-bar bigger. */ |
| 290 | |||
| 291 | Lisp_Object Vauto_resize_tool_bars; | ||
| 290 | 292 | ||
| 291 | /* Non-zero means draw block and hollow cursor as wide as the glyph | 293 | /* Non-zero means draw block and hollow cursor as wide as the glyph |
| 292 | under it. For example, if a block cursor is over a tab, it will be | 294 | under it. For example, if a block cursor is over a tab, it will be |
| @@ -9696,9 +9698,16 @@ display_tool_bar_line (it, height) | |||
| 9696 | out:; | 9698 | out:; |
| 9697 | 9699 | ||
| 9698 | row->displays_text_p = row->used[TEXT_AREA] != 0; | 9700 | row->displays_text_p = row->used[TEXT_AREA] != 0; |
| 9699 | /* Use default face for the border below the tool bar. */ | 9701 | |
| 9700 | if (!row->displays_text_p) | 9702 | /* Use default face for the border below the tool bar. |
| 9703 | |||
| 9704 | FIXME: When auto-resize-tool-bars is grow-only, there is | ||
| 9705 | no additional border below the possibly empty tool-bar lines. | ||
| 9706 | So to make the extra empty lines look "normal", we have to | ||
| 9707 | use the tool-bar face for the border too. */ | ||
| 9708 | if (!row->displays_text_p && !EQ (Vauto_resize_tool_bars, Qgrow_only)) | ||
| 9701 | it->face_id = DEFAULT_FACE_ID; | 9709 | it->face_id = DEFAULT_FACE_ID; |
| 9710 | |||
| 9702 | extend_face_to_end_of_line (it); | 9711 | extend_face_to_end_of_line (it); |
| 9703 | last = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1; | 9712 | last = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1; |
| 9704 | last->right_box_line_p = 1; | 9713 | last->right_box_line_p = 1; |
| @@ -9720,6 +9729,7 @@ display_tool_bar_line (it, height) | |||
| 9720 | if (!row->displays_text_p) | 9729 | if (!row->displays_text_p) |
| 9721 | { | 9730 | { |
| 9722 | row->height = row->phys_height = it->last_visible_y - row->y; | 9731 | row->height = row->phys_height = it->last_visible_y - row->y; |
| 9732 | row->visible_height = row->height; | ||
| 9723 | row->ascent = row->phys_ascent = 0; | 9733 | row->ascent = row->phys_ascent = 0; |
| 9724 | row->extra_line_spacing = 0; | 9734 | row->extra_line_spacing = 0; |
| 9725 | } | 9735 | } |
| @@ -9822,7 +9832,6 @@ redisplay_tool_bar (f) | |||
| 9822 | struct window *w; | 9832 | struct window *w; |
| 9823 | struct it it; | 9833 | struct it it; |
| 9824 | struct glyph_row *row; | 9834 | struct glyph_row *row; |
| 9825 | int change_height_p = 0; | ||
| 9826 | 9835 | ||
| 9827 | #ifdef USE_GTK | 9836 | #ifdef USE_GTK |
| 9828 | if (FRAME_EXTERNAL_TOOL_BAR (f)) | 9837 | if (FRAME_EXTERNAL_TOOL_BAR (f)) |
| @@ -9917,10 +9926,10 @@ redisplay_tool_bar (f) | |||
| 9917 | w->desired_matrix->no_scrolling_p = 1; | 9926 | w->desired_matrix->no_scrolling_p = 1; |
| 9918 | w->must_be_updated_p = 1; | 9927 | w->must_be_updated_p = 1; |
| 9919 | 9928 | ||
| 9920 | if (auto_resize_tool_bars_p) | 9929 | if (!NILP (Vauto_resize_tool_bars)) |
| 9921 | { | 9930 | { |
| 9922 | int nlines, nrows; | ||
| 9923 | int max_tool_bar_height = MAX_FRAME_TOOL_BAR_HEIGHT (f); | 9931 | int max_tool_bar_height = MAX_FRAME_TOOL_BAR_HEIGHT (f); |
| 9932 | int change_height_p = 0; | ||
| 9924 | 9933 | ||
| 9925 | /* If we couldn't display everything, change the tool-bar's | 9934 | /* If we couldn't display everything, change the tool-bar's |
| 9926 | height if there is room for more. */ | 9935 | height if there is room for more. */ |
| @@ -9946,29 +9955,40 @@ redisplay_tool_bar (f) | |||
| 9946 | 9955 | ||
| 9947 | /* Resize windows as needed by changing the `tool-bar-lines' | 9956 | /* Resize windows as needed by changing the `tool-bar-lines' |
| 9948 | frame parameter. */ | 9957 | frame parameter. */ |
| 9949 | if (change_height_p | 9958 | if (change_height_p) |
| 9950 | && (nlines = tool_bar_lines_needed (f, &nrows), | ||
| 9951 | nlines != WINDOW_TOTAL_LINES (w))) | ||
| 9952 | { | 9959 | { |
| 9953 | extern Lisp_Object Qtool_bar_lines; | 9960 | extern Lisp_Object Qtool_bar_lines; |
| 9954 | Lisp_Object frame; | 9961 | Lisp_Object frame; |
| 9955 | int old_height = WINDOW_TOTAL_LINES (w); | 9962 | int old_height = WINDOW_TOTAL_LINES (w); |
| 9963 | int nrows; | ||
| 9964 | int nlines = tool_bar_lines_needed (f, &nrows); | ||
| 9956 | 9965 | ||
| 9957 | XSETFRAME (frame, f); | 9966 | change_height_p = ((EQ (Vauto_resize_tool_bars, Qgrow_only) |
| 9958 | Fmodify_frame_parameters (frame, | 9967 | && !f->minimize_tool_bar_window_p) |
| 9959 | Fcons (Fcons (Qtool_bar_lines, | 9968 | ? (nlines > old_height) |
| 9960 | make_number (nlines)), | 9969 | : (nlines != old_height)); |
| 9961 | Qnil)); | 9970 | f->minimize_tool_bar_window_p = 0; |
| 9962 | if (WINDOW_TOTAL_LINES (w) != old_height) | 9971 | |
| 9972 | if (change_height_p) | ||
| 9963 | { | 9973 | { |
| 9964 | clear_glyph_matrix (w->desired_matrix); | 9974 | XSETFRAME (frame, f); |
| 9965 | f->n_tool_bar_rows = nrows; | 9975 | Fmodify_frame_parameters (frame, |
| 9966 | fonts_changed_p = 1; | 9976 | Fcons (Fcons (Qtool_bar_lines, |
| 9977 | make_number (nlines)), | ||
| 9978 | Qnil)); | ||
| 9979 | if (WINDOW_TOTAL_LINES (w) != old_height) | ||
| 9980 | { | ||
| 9981 | clear_glyph_matrix (w->desired_matrix); | ||
| 9982 | f->n_tool_bar_rows = nrows; | ||
| 9983 | fonts_changed_p = 1; | ||
| 9984 | return 1; | ||
| 9985 | } | ||
| 9967 | } | 9986 | } |
| 9968 | } | 9987 | } |
| 9969 | } | 9988 | } |
| 9970 | 9989 | ||
| 9971 | return change_height_p; | 9990 | f->minimize_tool_bar_window_p = 0; |
| 9991 | return 0; | ||
| 9972 | } | 9992 | } |
| 9973 | 9993 | ||
| 9974 | 9994 | ||
| @@ -13458,11 +13478,14 @@ redisplay_window (window, just_this_one_p) | |||
| 13458 | #else | 13478 | #else |
| 13459 | redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) | 13479 | redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) |
| 13460 | && (FRAME_TOOL_BAR_LINES (f) > 0 | 13480 | && (FRAME_TOOL_BAR_LINES (f) > 0 |
| 13461 | || auto_resize_tool_bars_p); | 13481 | || !NILP (Vauto_resize_tool_bars)); |
| 13462 | #endif | 13482 | #endif |
| 13463 | 13483 | ||
| 13464 | if (redisplay_tool_bar_p) | 13484 | if (redisplay_tool_bar_p && redisplay_tool_bar (f)) |
| 13465 | redisplay_tool_bar (f); | 13485 | { |
| 13486 | extern int ignore_mouse_drag_p; | ||
| 13487 | ignore_mouse_drag_p = 1; | ||
| 13488 | } | ||
| 13466 | } | 13489 | } |
| 13467 | #endif | 13490 | #endif |
| 13468 | } | 13491 | } |
| @@ -17270,9 +17293,9 @@ for details) to use. | |||
| 17270 | 17293 | ||
| 17271 | Optional second arg FACE specifies the face property to put | 17294 | Optional second arg FACE specifies the face property to put |
| 17272 | on all characters for which no face is specified. | 17295 | on all characters for which no face is specified. |
| 17273 | t means whatever face the window's mode line currently uses | 17296 | The value t means whatever face the window's mode line currently uses |
| 17274 | \(either `mode-line' or `mode-line-inactive', depending). | 17297 | \(either `mode-line' or `mode-line-inactive', depending). |
| 17275 | nil means the default is no face property. | 17298 | A value of nil means the default is no face property. |
| 17276 | If FACE is an integer, the value string has no text properties. | 17299 | If FACE is an integer, the value string has no text properties. |
| 17277 | 17300 | ||
| 17278 | Optional third and fourth args WINDOW and BUFFER specify the window | 17301 | Optional third and fourth args WINDOW and BUFFER specify the window |
| @@ -21871,7 +21894,7 @@ show_mouse_face (dpyinfo, draw) | |||
| 21871 | } | 21894 | } |
| 21872 | 21895 | ||
| 21873 | /* Change the mouse cursor. */ | 21896 | /* Change the mouse cursor. */ |
| 21874 | if (draw == DRAW_NORMAL_TEXT) | 21897 | if (draw == DRAW_NORMAL_TEXT && !EQ (dpyinfo->mouse_face_window, f->tool_bar_window)) |
| 21875 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); | 21898 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); |
| 21876 | else if (draw == DRAW_MOUSE_FACE) | 21899 | else if (draw == DRAW_MOUSE_FACE) |
| 21877 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); | 21900 | FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); |
| @@ -23993,7 +24016,7 @@ Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */); | |||
| 23993 | truncate_partial_width_windows = 1; | 24016 | truncate_partial_width_windows = 1; |
| 23994 | 24017 | ||
| 23995 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, | 24018 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, |
| 23996 | doc: /* nil means display the mode-line/header-line/menu-bar in the default face. | 24019 | doc: /* When nil, display the mode-line/header-line/menu-bar in the default face. |
| 23997 | Any other value means to use the appropriate face, `mode-line', | 24020 | Any other value means to use the appropriate face, `mode-line', |
| 23998 | `header-line', or `menu' respectively. */); | 24021 | `header-line', or `menu' respectively. */); |
| 23999 | mode_line_inverse_video = 1; | 24022 | mode_line_inverse_video = 1; |
| @@ -24090,12 +24113,13 @@ Autoselection selects the minibuffer only if it is active, and never | |||
| 24090 | unselects the minibuffer if it is active. */); | 24113 | unselects the minibuffer if it is active. */); |
| 24091 | Vmouse_autoselect_window = Qnil; | 24114 | Vmouse_autoselect_window = Qnil; |
| 24092 | 24115 | ||
| 24093 | DEFVAR_BOOL ("auto-resize-tool-bars", &auto_resize_tool_bars_p, | 24116 | DEFVAR_LISP ("auto-resize-tool-bars", &Vauto_resize_tool_bars, |
| 24094 | doc: /* *Non-nil means automatically resize tool-bars. | 24117 | doc: /* *Non-nil means automatically resize tool-bars. |
| 24095 | This increases a tool-bar's height if not all tool-bar items are visible. | 24118 | This dynamically changes the tool-bar's height to the minimum height |
| 24096 | It decreases a tool-bar's height when it would display blank lines | 24119 | that is needed to make all tool-bar items visible. |
| 24097 | otherwise. */); | 24120 | If value is `grow-only', the tool-bar's height is only increased |
| 24098 | auto_resize_tool_bars_p = 1; | 24121 | automatically; to decreace the tool-bar height, use \\[recenter]. */); |
| 24122 | Vauto_resize_tool_bars = Qt; | ||
| 24099 | 24123 | ||
| 24100 | DEFVAR_BOOL ("auto-raise-tool-bar-buttons", &auto_raise_tool_bar_buttons_p, | 24124 | DEFVAR_BOOL ("auto-raise-tool-bar-buttons", &auto_raise_tool_bar_buttons_p, |
| 24101 | doc: /* *Non-nil means raise tool-bar buttons when the mouse moves over them. */); | 24125 | doc: /* *Non-nil means raise tool-bar buttons when the mouse moves over them. */); |
diff --git a/src/xterm.c b/src/xterm.c index 7bbd2736307..e16fb852873 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8349,15 +8349,15 @@ do_ewmh_fullscreen (f) | |||
| 8349 | Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), | 8349 | Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), |
| 8350 | FRAME_X_DISPLAY_INFO (f)->root_window, | 8350 | FRAME_X_DISPLAY_INFO (f)->root_window, |
| 8351 | &num); | 8351 | &num); |
| 8352 | if (atoms && num > 0) | 8352 | if (atoms && num > 0) |
| 8353 | { | 8353 | { |
| 8354 | char **names = (char **) xmalloc (num * sizeof(*names)); | 8354 | char **names = (char **) xmalloc (num * sizeof(*names)); |
| 8355 | if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) | 8355 | if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) |
| 8356 | { | 8356 | { |
| 8357 | int i; | 8357 | int i; |
| 8358 | for (i = 0; i < num; ++i) | 8358 | for (i = 0; i < num; ++i) |
| 8359 | { | 8359 | { |
| 8360 | if (!have_net_atom) | 8360 | if (!have_net_atom) |
| 8361 | have_net_atom = strncmp (names[i], "_NET_", 5) == 0; | 8361 | have_net_atom = strncmp (names[i], "_NET_", 5) == 0; |
| 8362 | XFree (names[i]); | 8362 | XFree (names[i]); |
| 8363 | } | 8363 | } |
| @@ -8370,7 +8370,7 @@ do_ewmh_fullscreen (f) | |||
| 8370 | FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; | 8370 | FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; |
| 8371 | } | 8371 | } |
| 8372 | 8372 | ||
| 8373 | if (have_net_atom) | 8373 | if (have_net_atom) |
| 8374 | { | 8374 | { |
| 8375 | Lisp_Object frame; | 8375 | Lisp_Object frame; |
| 8376 | const char *atom = "_NET_WM_STATE"; | 8376 | const char *atom = "_NET_WM_STATE"; |
| @@ -8383,7 +8383,7 @@ do_ewmh_fullscreen (f) | |||
| 8383 | 8383 | ||
| 8384 | /* If there are _NET_ atoms we assume we have extended window manager | 8384 | /* If there are _NET_ atoms we assume we have extended window manager |
| 8385 | hints. */ | 8385 | hints. */ |
| 8386 | switch (f->want_fullscreen) | 8386 | switch (f->want_fullscreen) |
| 8387 | { | 8387 | { |
| 8388 | case FULLSCREEN_BOTH: | 8388 | case FULLSCREEN_BOTH: |
| 8389 | what = fs; | 8389 | what = fs; |
| @@ -8439,7 +8439,7 @@ static void | |||
| 8439 | XTfullscreen_hook (f) | 8439 | XTfullscreen_hook (f) |
| 8440 | FRAME_PTR f; | 8440 | FRAME_PTR f; |
| 8441 | { | 8441 | { |
| 8442 | if (f->async_visible) | 8442 | if (f->async_visible) |
| 8443 | { | 8443 | { |
| 8444 | BLOCK_INPUT; | 8444 | BLOCK_INPUT; |
| 8445 | do_ewmh_fullscreen (f); | 8445 | do_ewmh_fullscreen (f); |
| @@ -8459,7 +8459,7 @@ x_check_fullscreen (f) | |||
| 8459 | { | 8459 | { |
| 8460 | int width, height, ign; | 8460 | int width, height, ign; |
| 8461 | 8461 | ||
| 8462 | if (do_ewmh_fullscreen (f)) | 8462 | if (do_ewmh_fullscreen (f)) |
| 8463 | return; | 8463 | return; |
| 8464 | 8464 | ||
| 8465 | x_real_positions (f, &f->left_pos, &f->top_pos); | 8465 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| @@ -8793,20 +8793,26 @@ XTframe_raise_lower (f, raise_flag) | |||
| 8793 | { | 8793 | { |
| 8794 | if (raise_flag) | 8794 | if (raise_flag) |
| 8795 | { | 8795 | { |
| 8796 | Lisp_Object frame; | 8796 | /* The following code is needed for `raise-frame' to work on |
| 8797 | const char *atom = "_NET_ACTIVE_WINDOW"; | 8797 | some versions of metacity; see Window Manager |
| 8798 | Specification/Extended Window Manager Hints at | ||
| 8799 | http://freedesktop.org/wiki/Standards_2fwm_2dspec | ||
| 8800 | |||
| 8801 | However, on other versions (metacity 2.17.2-1.fc7), it | ||
| 8802 | reportedly causes hangs when resizing frames. */ | ||
| 8803 | |||
| 8804 | /* Lisp_Object frame; | ||
| 8805 | const char *atom = "_NET_ACTIVE_WINDOW"; */ | ||
| 8798 | 8806 | ||
| 8799 | x_raise_frame (f); | 8807 | x_raise_frame (f); |
| 8800 | /* See Window Manager Specification/Extended Window Manager Hints at | ||
| 8801 | http://freedesktop.org/wiki/Standards_2fwm_2dspec */ | ||
| 8802 | 8808 | ||
| 8803 | XSETFRAME (frame, f); | 8809 | /* XSETFRAME (frame, f); |
| 8804 | Fx_send_client_event (frame, make_number (0), frame, | 8810 | Fx_send_client_event (frame, make_number (0), frame, |
| 8805 | make_unibyte_string (atom, strlen (atom)), | 8811 | make_unibyte_string (atom, strlen (atom)), |
| 8806 | make_number (32), | 8812 | make_number (32), |
| 8807 | Fcons (make_number (1), | 8813 | Fcons (make_number (1), |
| 8808 | Fcons (make_number (time (NULL) * 1000), | 8814 | Fcons (make_number (time (NULL) * 1000), |
| 8809 | Qnil))); | 8815 | Qnil))); */ |
| 8810 | } | 8816 | } |
| 8811 | else | 8817 | else |
| 8812 | x_lower_frame (f); | 8818 | x_lower_frame (f); |
| @@ -10243,8 +10249,8 @@ x_query_font (f, fontname) | |||
| 10243 | 10249 | ||
| 10244 | for (i = 0; i < dpyinfo->n_fonts; i++) | 10250 | for (i = 0; i < dpyinfo->n_fonts; i++) |
| 10245 | if (dpyinfo->font_table[i].name | 10251 | if (dpyinfo->font_table[i].name |
| 10246 | && (!strcasecmp (dpyinfo->font_table[i].name, fontname) | 10252 | && (!xstricmp (dpyinfo->font_table[i].name, fontname) |
| 10247 | || !strcasecmp (dpyinfo->font_table[i].full_name, fontname))) | 10253 | || !xstricmp (dpyinfo->font_table[i].full_name, fontname))) |
| 10248 | return (dpyinfo->font_table + i); | 10254 | return (dpyinfo->font_table + i); |
| 10249 | return NULL; | 10255 | return NULL; |
| 10250 | } | 10256 | } |
| @@ -11272,7 +11278,7 @@ syms_of_xterm () | |||
| 11272 | DEFVAR_BOOL ("x-use-underline-position-properties", | 11278 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 11273 | &x_use_underline_position_properties, | 11279 | &x_use_underline_position_properties, |
| 11274 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 11280 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. |
| 11275 | nil means ignore them. If you encounter fonts with bogus | 11281 | A value of nil means ignore them. If you encounter fonts with bogus |
| 11276 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 11282 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 11277 | to 4.1, set this to nil. */); | 11283 | to 4.1, set this to nil. */); |
| 11278 | x_use_underline_position_properties = 1; | 11284 | x_use_underline_position_properties = 1; |
| @@ -11280,9 +11286,9 @@ to 4.1, set this to nil. */); | |||
| 11280 | DEFVAR_BOOL ("x-underline-at-descent-line", | 11286 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 11281 | &x_underline_at_descent_line, | 11287 | &x_underline_at_descent_line, |
| 11282 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 11288 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. |
| 11283 | nil means to draw the underline according to the value of the variable | 11289 | A value of nil means to draw the underline according to the value of the |
| 11284 | `x-use-underline-position-properties', which is usually at the baseline | 11290 | variable `x-use-underline-position-properties', which is usually at the |
| 11285 | level. The default value is nil. */); | 11291 | baseline level. The default value is nil. */); |
| 11286 | x_underline_at_descent_line = 0; | 11292 | x_underline_at_descent_line = 0; |
| 11287 | 11293 | ||
| 11288 | DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", | 11294 | DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", |