1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 00:30:37 -08:00
Commit graph

11396 commits

Author SHA1 Message Date
Jan Djärv
97f18cc83d * xfns.c (unwind_create_frame):
* nsfns.m (unwind_create_frame):
* w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
Vframe_list.

Fixes: debbugs:9999
2011-11-11 19:33:30 +01:00
Dmitry Antipov
22a648b4d6 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext. 2011-11-11 01:18:32 -08:00
Kenichi Handa
659afedebb callproc.c (Fcall_process): Set the member dst_multibyte of process_coding. 2011-11-11 17:09:40 +09:00
Kenichi Handa
0756b0c3a6 merge trunk 2011-11-11 16:08:47 +09:00
Kenichi Handa
9ac0394b8d xdisp.c (fill_composite_glyph_string): Always set s->face, to avoid a crash (bug#9496). 2011-11-11 16:08:10 +09:00
Chong Yidong
2fbdc249e6 Disallow calling window-inside-edges and related functions on internal windows.
* src/window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
(Fwindow_inside_absolute_pixel_edges): Only allow live windows.
2011-11-09 22:29:23 +08:00
Paul Eggert
ac6b1f816a * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926). 2011-11-08 12:15:17 -08:00
Paul Eggert
09db192c23 Avoid some portability problems by eschewing 'extern inline' functions.
The trivial performance wins aren't worth the portability hassles; see
<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
et seq.
* dispextern.h (window_box, window_box_height, window_text_bottom_y)
(window_box_width, window_box_left, window_box_left_offset)
(window_box_right, window_box_right_offset): Undo previous change,
by removing the "extern"s.
* intervals.c (adjust_intervals_for_insertion)
(adjust_intervals_for_deletion): Undo previous change,
making these static again.
(offset_intervals, temp_set_point_both, temp_set_point)
(copy_intervals_to_string): No longer inline.
* xdisp.c (window_text_bottom_y, window_box_width)
(window_box_height, window_box_left_offset)
(window_box_right_offset, window_box_left, window_box_right)
(window_box): No longer inline.
2011-11-08 12:05:27 -08:00
Chong Yidong
105216ed03 Move low-level window width/height functions to C, and high-level functions to Lisp.
* lisp/window.el (window-total-height, window-total-width): Doc fix.
(window-body-size): Move from C.
(window-body-height, window-body-width): Move to C.

* src/window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
(Fwindow_body_height, Fwindow_body_width): Move from Lisp.  Signal
an error if not a live window.
(Fwindow_total_width, Fwindow_total_height): Move from Lisp.
(Fwindow_total_size, Fwindow_body_size): Move to Lisp.
2011-11-08 15:25:56 +08:00
Juanma Barranquero
ae9e237fe1 src/lisp.h (syms_of_abbrev): Remove declaration.
Reported by CHENG Gao <chenggao@royau.me>.
2011-11-07 18:04:01 +01:00
Eli Zaretskii
c7aa833355 Allow to run temacs.exe on MS-Windows in GUI mode.
src/w32.c (check_windows_init_file): Don't look for term/w32-win.el
 if Vpurify_flag is non-nil.  Fixes a crash when running w32 build
 of temacs in GUI mode.
2011-11-07 18:42:34 +02:00
Martin Rudalics
be7f55452c Remove term "subwindow" from code and documentation.
* window.h: Declare delete_all_child_windows instead of
delete_all_subwindows.
* window.c (Fwindow_nest, Fset_window_nest)
(Fset_window_new_total, Fset_window_new_normal)
(Fwindow_resize_apply): Don't use term subwindow in doc-strings.
(delete_all_subwindows): Rename to delete_all_child_windows.
(Fdelete_other_windows_internal, Fset_window_configuration):
Call delete_all_child_windows instead of delete_all_subwindows.
* frame.c (delete_frame): Call delete_all_child_windows instead
of delete_all_subwindows.

* window.el (window-combinations): Make WINDOW argument
mandatory.  Rewrite doc-string.
(walk-window-subtree, window-atom-check, window-min-delta)
(window-max-delta, window--resize-this-window)
(window--resize-root-window-vertically, window-tree)
(balance-windows, window-state-put): Rewrite doc-strings as to
not mention the term "subwindow".
(window--resize-subwindows-skip-p): Rename to
window--resize-child-windows-skip-p.
(window--resize-subwindows-normal): Rename to
window--resize-child-windows-normal.
(window--resize-subwindows): Rename to
window--resize-child-windows.
(window-or-subwindow-p): Rename to window--in-subtree-p.

* windows.texi (Resizing Windows, Splitting Windows)
(Window Configurations): Use "child window" instead of
"subwindow".
2011-11-07 10:51:08 +01:00
Paul Eggert
ca78dc431f * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
This is also needed for porting to any host where GC_MARK_STACK is
not GC_MAKE_GCPROS_NOOPS.
(which_symbols): Use it.
2011-11-06 21:37:49 -08:00
Kenichi Handa
0d92c7bfab merge trunk 2011-11-07 11:00:43 +09:00
Kenichi Handa
a0241d014e Set members of the struct coding_system before accessing them (bug#9910,9911,9912). 2011-11-07 10:57:07 +09:00
Glenn Morris
a64bfdfa5a Merge from emacs-23; up to 2010-06-22T07:41:10Z!rgm@gnu.org 2011-11-06 15:38:01 -08:00
Paul Eggert
cb41b32a23 Fix some portability problems with 'inline'.
* dispextern.h (window_box, window_box_height, window_text_bottom_y)
(window_box_width, window_box_left, window_box_left_offset)
(window_box_right, window_box_right_offset): Declare extern.
Otherwise, these inline functions do not conform to C99 and
are miscompiled by Microsoft compilers.  Reported by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
* intervals.c (adjust_intervals_for_insertion)
(adjust_intervals_for_deletion): Now extern, because otherwise the
extern inline functions 'offset_intervals' couldn't refer to it.
(static_offset_intervals): Remove.
(offset_intervals): Rewrite using the old contents of
static_offset_intervals.  The old version didn't conform to C99
because an extern inline function contained a reference to an
identifier with static linkage.
2011-11-06 13:12:10 -08:00
Andreas Schwab
b70413668a * src/keyboard.c (interrupt_signal): Don't call kill-emacs while in
GC.
2011-11-06 20:42:14 +01:00
Eli Zaretskii
88a37c4d87 Fix bug #9963 with abort in "temacs -nw".
src/xdisp.c (init_iterator, reseat_to_string): Don't set the
 iterator's bidi_p flag if Vpurify_flag is non-nil.
 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
 return Qleft_to_right.
2011-11-06 20:21:52 +02:00
Chong Yidong
49745b39a1 Delete window-combination-p; tweaks to window-top-child and window-left-child.
* lisp/window.el (window-combination-p): Function deleted; its
side-effect is not used in any existing code.
(window-combinations, window-combined-p): Call window-*-child
directly.

* window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
(Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
(Fset_window_splits, Fwindow_nest, Fset_window_nest)
(Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
(Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
(Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
(Fwindow_vscroll): Doc fix.
(Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
argument, since it makes no sense to pass a live window and for
consistency with window-child.
2011-11-06 11:59:53 +08:00
Christoph Scholtes
1f05cd82d2 * src/makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
support MSVC.
2011-11-05 16:55:08 -06:00
Jason Rumney
226109108e * src/w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
(add_font_entity_to_list): Filter out non-Japanese Shift-JIS
fonts.
(add_font_entity_to_list): Fix logic errors in mixed boolean and
bitwise arithmetic preventing use of unicode-sip and non-truetype
opentype fonts.

Fixes: debbugs:6029
2011-11-06 02:50:59 +08:00
Eli Zaretskii
3ad924ba1e Fix MSVC build in lib-src.
src/s/ms-w32.h (fstat, stat, utime): Move redirections to
 "emacs"-only part.

Fixes: debbugs:99690
2011-11-05 18:30:13 +02:00
Eli Zaretskii
a06776b28c Modify w32fns.c similarly to 2011-11-05T12:04:34Z!jan.h.d@swipnet.se.
src/w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
 initialization code to keep similarity to xfns.c after changes
 from 2011-11-05.

Fixes: debbugs:9943
2011-11-05 18:25:16 +02:00
Jan Djärv
a97f8f3f16 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
(unwind_create_frame): New function.
(Fx_create_frame): Restructure code to be more similar to the one in
xfns.c.  Call record_unwind_protect with unwind_create_frame (Bug#9943).
Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
Move terminal->reference_count++ just before making the frame official
(Bug#9943).

* nsterm.m (x_free_frame_resources): New function.
(x_destroy_window): Move code to x_free_frame_resources.
2011-11-05 13:25:01 +01:00
Jan Djärv
c9e7db78ef * xfns.c (unwind_create_frame): Fix comment.
(Fx_create_frame, x_create_tip_frame): Move
terminal->reference_count++ just before making the frame
official. Move initialization of image_cache_refcount and
dpyinfo_refcount before calling init_frame_faces.

Fixes: debbugs:9943
2011-11-05 13:04:34 +01:00
Eli Zaretskii
a6fc3b5c53 Support MSVC build with newer versions of Visual Studio.
Small portions of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>.

 src/makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
 Nmake barfs on that.  Use $(OBJ*_c) variables instead, defined on
 nt/gmake.defs.
 src/lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
 which are not supported by MSVC.
 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
 bitfields.
 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
 types in bitfields.
 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
 src/w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
 src/w32.c: Don't include w32api.h for MSVC.
 (init_environment) [_MSC_VER]: Call sys_access, not _access.
 src/s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
 e_* cousins.
 (alloca) [_MSC_VER]: Define to _alloca.
 src/lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
 src/regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
 nt/makefile.w32-in (clean-other-dirs-nmake)
 (distclean-other-dirs-nmake, maintainer-clean-other-dirs-nmake):
 Update for current structure of doc/ subdirectories.
 nt/gmake.defs (OBJ0_c, OBJ1_c, OBJ2_c): New variables.
 nt/INSTALL: Update for newer versions of MSVC.
 lib/makefile.w32-in (FRC): New dummy target.
 (TAGS): Depend on FRC.

Fixes: debbugs:9960
2011-11-05 13:34:56 +02:00
Eli Zaretskii
a58c13ed78 Fix bug #9955 with mouse-highlight that starts at beginning of window.
src/xdisp.c (note_mouse_highlight): If either of
 previous/next-single-property-change returns nil, treat that as
 the beginning or the end of the buffer.
2011-11-04 22:01:06 +02:00
Jan Djärv
fe0b6370b7 * gtkutil.c (xg_make_tool_item): Add callbacks of one of wimage or
label is not null.
(xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
may be NULL.

Fixes: debbugs:9951
2011-11-04 19:18:05 +01:00
Eli Zaretskii
89bd5ee15a Fix documentation per bug #9949.
src/window.c (Fwindow_body_size): Mention in the doc string that the
 return value is in frame's canonical units.
 lisp/window.el (window-body-height, window-body-width): Mention in
 the doc string that the return values are in frame's canonical
 units.
 doc/lispref/windows.texi (Window Sizes): Mention in the doc string that the
 return values of `window-body-height' and `window-body-width' are
 in frame's canonical units.
2011-11-04 12:09:41 +02:00
Eli Zaretskii
4e2fb5c762 Fix bug #9947 with referencing uninitialized variable.
src/xdisp.c (note_mouse_highlight): Initialize `area'.
2011-11-04 00:11:40 +02:00
Eli Zaretskii
2a58bbc183 Fix bug #9943 on X.
src/xfns.c (unwind_create_frame): If needed, free the glyph
 matrices of the partially constructed frame.
2011-11-03 23:56:32 +02:00
Eli Zaretskii
3ab15fd62d src/ChangeLog: Fix entry for last commit. 2011-11-03 21:06:42 +02:00
Eli Zaretskii
84c3edb9f2 Fix bug #9943 with abort at shutdown.
src/w32fns.c (unwind_create_frame): If needed, free the glyph
 matrices of the partially constructed frame.
2011-11-03 21:04:18 +02:00
Eli Zaretskii
26b46e515c Rename locals to match their nature.
src/xdisp.c (mouse_face_from_buffer_pos, note_mouse_highlight): Rename
 cover_string to disp_string.
2011-11-01 21:19:07 +02:00
Eli Zaretskii
bc17a887d1 Fix mouse highlight in continued lines on a TTY.
src/xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
 Don't stop backward scan on the continuation glyph, even though
 its CHARPOS is positive.
2011-11-01 20:57:03 +02:00
Martin Rudalics
4ee8844078 Remove unused variable temp-buffer-show-specifiers.
* window.c (temp_output_buffer_show): Don't use
Vtemp_buffer_show_specifiers.
(Vtemp_buffer_show_specifiers): Remove unused variable.
* help.el (with-help-window): Don't reference
temp-buffer-show-specifiers in doc-string.
2011-11-01 17:21:41 +01:00
YAMAMOTO Mitsuharu
ba24cea259 Fix memory leak by y-or-n-p-with-timeout with GUI (Bug#9830).
* xmenu.c (cleanup_widget_value_tree): New function.
(xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
calling free_menubar_widget_value_tree directly (Bug#9830).
2011-10-31 12:08:54 +09:00
Eli Zaretskii
c2ff3c02a4 Fix random crashes while scrolling backwards.
src/xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
 past the beginning of the current glyph matrix.
2011-10-30 20:07:48 +02:00
Jan Djärv
6e56383b57 Fix bug 9869.
xterm.c: Include X11/Xproto.h if HAVE_GTK3.
(x_error_handler): Ignore BadMatch for X_SetInputFocus for
HAVE_GTK3 (Bug#9869).
2011-10-30 19:04:13 +01:00
Jan Djärv
3b574623e9 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
type to GDK_NOTHING so valgrind does not complain.

Fixes: debbugs:9901
2011-10-30 18:31:02 +01:00
Jan Djärv
b77a6a7f9c Fix hang after C-z in gnome-shell.
* xterm.c: Declare x_handle_net_wm_state to return int.
(handle_one_xevent): Check if we are iconified but don't have
_NET_WM_STATE_HIDDEN.  If do, treat as deiconify.
(get_current_wm_state): Return non-zero if not hidden,
check for _NET_WM_STATE_HIDDEN (Bug#9893).
(do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
(x_handle_net_wm_state): Return what get_current_wm_state returns.
(x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.

* xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
2011-10-30 18:17:48 +01:00
Paul Eggert
196e41e4ae * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
so that this new function doesn't get optimized away by a
whole-program optimizer.  Make the 2nd arg EMACS_INT, not int.
2011-10-29 10:25:44 -07:00
Andreas Schwab
021f2e1a47 * src/frame.h (MOUSE_HL_INFO): Remove excess parens. 2011-10-29 17:50:30 +02:00
Eli Zaretskii
4452fb80c7 Fix attribution for last commit in src/ChangeLog. 2011-10-29 15:38:21 +02:00
Eli Zaretskii
8b058d4474 Fix the `xbytecode' user-defined command in .gdbinit.
src/.gdbinit (xprintbytestr): New command.
 (xwhichsymbols): Renamed from `which'; all callers changed.
 (xbytecode): Print the byte-code string as well.
 src/alloc.c (which_symbols): New function.
2011-10-29 15:35:23 +02:00
Eli Zaretskii
aa4dfba7fd Revert last commit. 2011-10-29 12:02:39 +02:00
Eli Zaretskii
567843934e Fix bug #9902 with crash caused by clearing mouse highlight.
src/xdisp.c (note_mouse_highlight): Don't clear mouse highlight if
 hlinfo->mouse_face_window is nil.
2011-10-29 11:36:42 +02:00
Andreas Schwab
21b7206797 Fixes: debbugs:9903
* src/minibuf.c (read_minibuf_noninteractive): Allow reading empty
line.
2011-10-29 10:54:06 +02:00
Glenn Morris
83ed7b5c7e Revert problematic change to wait_reading_process_output.
* src/process.c (wait_reading_process_output): Revert 2009-08-30 change.
Not clear what it was for, and it causes various bugs.  (Bug#9839)
2011-10-28 20:12:02 -04:00