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

28819 commits

Author SHA1 Message Date
Eli Zaretskii
9166b0f33f Mention in src/ChangeLog the bug number solved by 2010-04-19T12:12:13Z!eliz@gnu.org. 2010-04-19 16:17:44 +03:00
Eli Zaretskii
d1da276f60 .gdbinit (xsubchartable): New command. 2010-04-19 16:05:35 +03:00
Eli Zaretskii
37dcfea079 Fix crashes in GC in "emacs -nw".
xdisp.c (display_line): Don't write beyond the last glyph row in
 the desired matrix.  Fixes crashes in "emacs -nw", see
 http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00075.html
 and http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00213.html
2010-04-19 15:12:13 +03:00
Stefan Monnier
e951580547 Hash-cons pure data.
* alloc.c (Fpurecopy): Hash-cons if requested.
(syms_of_alloc): Update purify-flag docstring.
* loadup.el: Setup hash-cons for pure data.
2010-04-18 17:49:33 -04:00
Jan Djärv
22aa44a857 Set USER_POS in hint_flags to work around Cygwin problem.
gtkutil.c (xg_set_geometry): Set size in geometry string also.
(x_wm_set_size_hint): Set USER_POS in hint_flags (Bug#5968).
2010-04-18 13:24:59 +02:00
Chong Yidong
b8a1d5a14b Fix crash on NextStep terminal (Bug#5837)
* xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
terminal frames (Bug#5837).
2010-04-17 11:53:55 -04:00
Eli Zaretskii
ebb5722ecf Fix a crash when an NSM character is inserted at BEGV.
bidi.c (bidi_init_it): Fix initialization of bidi_it->prev.
 (bidi_resolve_weak): Don't use prev.type_after_w1 if it is
 NEUTRAL_B or UNKNOWN_BT.
2010-04-17 16:34:23 +03:00
Eli Zaretskii
0f4442efb1 Fix bug #5943: C-e in a truncated line doesn't auto-hscroll.
xdisp.c (set_cursor_from_row): Don't consider possibility of
 other rows with cursor unless they are different from this row and
 this row is part of a continued line.
2010-04-16 23:37:59 +03:00
Dan Nicolaescu
7d4e45f81c * s/freebsd.h: Restore osreldate.h include.
Suggested by Naohiro Aota.
2010-04-16 10:22:12 -07:00
Jan D
5ba5ec85f6 * xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used. 2010-04-16 19:05:31 +02:00
Chong Yidong
20af301df3 * s/cygwin.h: Avoid linking against static libgcc.
See http://lists.gnu.org/archive/html/emacs-devel/2010-01/msg01128.html
2010-04-15 21:00:45 -04:00
Juri Linkov
a4b000fb3d Add the `scroll-command' property.
* window.c: Add Qscroll_command.
Remove Vscroll_preserve_screen_position_commands.
(window_scroll_pixel_based, window_scroll_line_based): Check the
`scroll-command' property on the last command instead of searching
the last command in Vscroll_preserve_screen_position_commands.
(syms_of_window): Initialize and staticpro `Qscroll_command'.
Put Qscroll_command property on Qscroll_up and Qscroll_down.
(scroll-preserve-screen-position): Doc fix.
(Vscroll_preserve_screen_position_commands): Remove variable.

* simple.el (scroll-up-command, scroll-down-command)
(scroll-up-line, scroll-down-line): Put `scroll-command'
property on the these symbols.  Remove them from
`scroll-preserve-screen-position-commands'.

* mwheel.el (mwheel-scroll): Put `scroll-command' and
`isearch-scroll' properties on the `mwheel-scroll' symbol.
Remove it from `scroll-preserve-screen-position-commands'.

* isearch.el (isearch-allow-scroll): Doc fix.
2010-04-16 02:51:12 +03:00
Dan Nicolaescu
0003071042 * frame.h (FRAME_SAMPLE_VISIBILITY): Undo previous change. 2010-04-15 14:52:27 -07:00
Dan Nicolaescu
6bb244570e * xdisp.c (message): Do not use NO_ARG_ARRAY. 2010-04-15 11:24:00 -07:00
Dan Nicolaescu
bc319ba448 * frame.h (FRAME_SAMPLE_VISIBILITY): Remove unused 0 in comma expression. 2010-04-15 11:19:00 -07:00
Dan Nicolaescu
19d4c244ec Reduce cpp use in Makefile.in.
* Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS)
(LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H)
(GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section.
(ORDINARY_LINK): Remove, defined in src/s/gnu.h.
(CRT0_COMPILE): Remove, inline it in the only user.
2010-04-14 08:36:25 -07:00
Juri Linkov
3212974649 Bind C-v' to scroll-up-command' and M-v' to scroll-down-command'.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html

* window.c (keys_of_window): Rebind `C-v' from `scroll-up' to
`scroll-up-command' and `M-v' from `scroll-down' to
`scroll-down-command'.

* tutorial.el (tutorial--default-keys): Rebind `C-v' to
`scroll-up-command' and `M-v' to `scroll-down-command'.

* emulation/cua-rect.el (cua--init-rectangles):
* forms.el (forms--change-commands):
* image-mode.el (image-mode-map):
Remap scroll-down-command and scroll-up-command
in addition to scroll-down and scroll-up.
2010-04-14 03:33:32 +03:00
Juri Linkov
9013a7f82e Add variable `scroll-preserve-screen-position-commands'.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html

* window.c (Vscroll_preserve_screen_position_commands): New variable
with the default value as the list of Qscroll_down and Qscroll_up.
(window_scroll_pixel_based, window_scroll_line_based): Search the
last command in the list Vscroll_preserve_screen_position_commands
instead of comparing with Qscroll_up and Qscroll_down.

* mwheel.el (scroll-preserve-screen-position-commands):
Add mwheel-scroll to this list of commands.

* simple.el (scroll-preserve-screen-position-commands):
Add scroll-up-command, scroll-down-command, scroll-up-line,
scroll-down-line to this list of commands.
2010-04-14 03:11:21 +03:00
Jan Djärv
92848133b2 Fix so top -10 and left -10 in frame parameters work.
* gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
(x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
does that.
2010-04-13 17:16:42 +02:00
Jan Djärv
4bef8d2634 (Fx_create_frame, x_create_tip_frame): Set default border width to zero. 2010-04-13 10:19:05 +02:00
Stefan Monnier
eb6967a081 Remove the Arch metafiles. 2010-04-12 23:06:50 -04:00
Stefan Monnier
84164a0dc1 (init_tty): Move common text outside of #ifdef TERMINFO. 2010-04-12 22:19:17 -04:00
Stefan Monnier
2b0a91e78f Try to solve the problem of spurious EOF chars in long lines of text
sent to interactive subprocesses.
* sysdep.c (child_setup_tty): Do not enable ICANON any more.
(system_process_attributes): Remove unused var `ttotal'.
* process.c (send_process): Don't bother breaking long line with EOF
chars when talking to ttys any more.
(wait_reading_process_output): Output a warning when called in such
a way that it could block without being interruptible.
2010-04-12 22:07:48 -04:00
Stefan Monnier
58b963f7f3 Try to detect file modification within the same second.
* buffer.h (struct buffer): New field modtime_size.
* buffer.c (reset_buffer): Initialize it.
* fileio.c (Finsert_file_contents, Fwrite_region): Set it.
(Fverify_visited_file_modtime): Check it.
(Fclear_visited_file_modtime, Fset_visited_file_modtime): Clear it.
(Fset_visited_file_modtime): Set (or clear) it.
2010-04-12 21:47:40 -04:00
Stefan Monnier
01f5787b8a * process.c (status_notify): Remove unused var `ro'. 2010-04-12 19:49:29 -04:00
Jan Djärv
83725342d5 xfns.c (select_visual): Don't call error if XGetVisualInfo returns
more than one visual (Bug#5938).
2010-04-12 20:58:15 +02:00
Dan Nicolaescu
b9465836b1 * Makefile.in (C_SWITCH_SYSTEM,C_SWITCH_MACHINE,C_SWITCH_X_SITE): Undefine. 2010-04-12 07:32:10 -07:00
Jan Djärv
e18006e5c8 Restore C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM. 2010-04-12 13:28:56 +02:00
Jan Djärv
c9b389c0cc Change so emacs at least compiles.
#undef C_SWITCH_MACHINE
#undef C_SWITCH_SYSTEM
#undef C_SWITCH_X_SITE
2010-04-12 12:59:35 +02:00
Dan Nicolaescu
b1f5216132 Remove C_SWITCH_SYSTEM_TEMACS.
* s/darwin.h (C_SWITCH_SYSTEM_TEMACS): Remove.
(malloc, realloc, free): Use emacs, not temacs for conditional
definition.

* Makefile.in (C_SWITCH_SYSTEM_TEMACS): Remove.
(ALL_CFLAGS): Do not use C_SWITCH_SYSTEM_TEMACS.
2010-04-11 14:43:28 -07:00
Dan Nicolaescu
8d9c8ece91 Use autoconf, not cpp for some variables.
* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
(C_SWITCH_X_SITE): Define using autoconf, not cpp.
(ALL_CFLAGS): Use them as make variables.
(really-lwlib, really-oldXMenu): Do not pass them.
2010-04-11 13:04:24 -07:00
Jan Djärv
1ecb2d3f03 Use XFT in Lucid dialogs if available.
* xmenu.c (apply_systemfont_to_dialog): New.
	(create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.

	* lwlib-Xaw.c (widget_xft_data): New for Xft data.
	(fill_xft_data, openFont, get_text_width_and_height)
	(draw_text, set_text, find_xft_data, command_press)
	(command_reset): New functions.
	(xaw_update_one_widget): Call set_text for dialog and buttons
	if HAVE_XFT.  Also set internalHeight for buttons.
	(xaw_destroy_instance): Free all Xft related data.
	(button_actions, buttonTrans): New structures.
	(make_dialog): Call XtAppAddActions for button_actions.
	Find xft font to use and call fill_xft_data for widgets.
	(xaw_create_dialog): Pass instance parameter to make_dialog.

	* lwlib-int.h (_widget_instance): Add Xft data if HAVE_XFT.
	Override translations for buttons.  If depth is 16 or more, tell
	Xaw3d to not be nice to colormap.
	Remove separator widget, use XtNhorizDistance on first right button
	instead.

	* xresources.texi (Lucid Resources): Mention faceName for dialogs.
2010-04-11 20:25:09 +02:00
Stefan Monnier
97e53006f6 * process.c (exec_sentinel): Preserve current-buffer. 2010-04-11 12:15:09 -04:00
Stefan Monnier
3a4fa2f208 (read_process_output): Move the save-current-buffer to
apply to both the filter and the non-filter branches.
2010-04-11 11:53:13 -04:00
Dan Nicolaescu
88df722194 * s/msdos.h (UNEXEC): New definition. 2010-04-10 13:38:48 -07:00
YAMAMOTO Mitsuharu
5b253e9c5c xfns.c (Fx_show_tip): Subtract last glyph's width only when it is for padding. 2010-04-10 19:59:46 +09:00
YAMAMOTO Mitsuharu
6eff5c3dcd Don't abort try_window with fonts change when showing tooltip (Bug#2423).
* dispextern.h (TRY_WINDOW_CHECK_MARGINS)
(TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.

* xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
TRY_WINDOW_CHECK_MARGINS.

* xfns.c (Fx_show_tip): Call try_window with TRY_WINDOW_IGNORE_FONTS_CHANGE.
2010-04-10 19:52:30 +09:00
YAMAMOTO Mitsuharu
5634ff8508 xfns.c (Fx_show_tip): Undo last change. 2010-04-10 19:39:16 +09:00
Jan D
b13aef5499 Fix showing the complete tip the first time, bug #2423.
* xfns.c (Fx_show_tip): Call try_window in a loop until
fonts_changed_p is zero (Bug#2423).
2010-04-09 18:49:06 +02:00
Eli Zaretskii
21d2848427 Fix bug#5856: don't dereference glyphs beyond end of glyph_row.
xdisp.c (set_cursor_from_row): Don't dereference glyphs beyond
 the end of TEXT_AREA.  (Bug#5856)
2010-04-09 00:14:33 +03:00
Jan Djärv
0269ef7730 * xsettings.c (XSETTINGS_FONT_NAME): Move XSETTINGS_FONT_NAME out of HAVE_GCONF. 2010-04-08 20:22:51 +02:00
Eli Zaretskii
5930fe974d Fix crash due to incorrect resolution of type of NSM characters (bug#5858).
bidi.c (bidi_resolve_weak): Use prev.type_after_w1, instead of
 prev.orig_type, for resolving type of NSM.
2010-04-08 20:35:10 +03:00
Jan Djärv
99852628a8 Lucid menus can now use Xft for fonts.
* xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
(parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
in current_font.
(init_gconf): Read value of SYSTEM_FONT and save it in current_font.
(Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
functions.
(syms_of_xsettings): Initialize current_font. defsubr
Sfont_get_system_normal_font.

* xsettings.h (Ffont_get_system_normal_font,
xsettings_get_system_normal_font): Declare.

* xfns.c (extern xlwmenu_default_font): Remove.
(Fx_create_frame): Remove setting of xlwmenu_default_font, moved
to xlwmenu.c.

* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.

* xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu.

* xlwmenu.c (xlwmenu_default_font): Make static.
(xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
(string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
HAVE_XFT.
(size_menu): Set max_rest_width in window_state structure.
(display_menu_item): If HAVE_XFT and xft_draw is set, use
XftDrawRect and XftDrawStringUtf8 to draw text.
(make_windows_if_needed): Set max_rest_width and xft_draw
in windows[i].
(openXftFont): New.
(XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
is not set, load font fixed and save it in xlwmenu_default_font.
(XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
(XlwMenuClassInitialize): Initialize xlwmenu_default_font.
(XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
windows[0].xft_draw if xft_font is set.
(XlwMenuDestroy): Destroy all xft_draw and close xft_font.
(facename_changed): New.
(XlwMenuSetValues): Call facename_changed. If face name did change,
close old fonts and destroy xft_draw:s.  Then create new ones.

* xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
XtCDefaultFace): New.

* xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
(_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
xft_font.

* xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
2010-04-08 18:20:32 +02:00
Jan D
7fc874c42c Fix resizing for X and non-Gtk+ build. Bug #5848.
* frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use
  FRAME_LINE_TO_PIXEL_Y.

* xterm.c (x_set_window_size_1): Don't add border_width/height to
  pixelwidth/height.
2010-04-07 13:39:26 +02:00
Dan Nicolaescu
5e5a3b92e4 Simplify code for HP machines.
* m/hp800.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, NO_REMAP): Do not define
for GNU_LINUX, not needed.
(UNEXEC, NEED_BSDTTY): Move definitions...
* s/hpux10-20.h (UNEXEC, NEED_BSDTTY): ... here.
2010-04-06 23:11:45 -07:00
Dan Nicolaescu
863bf4810a * m/iris4d.h (UNEXEC): Move definition ...
* s/irix6-5.h (UNEXEC): ... here.
2010-04-06 23:01:30 -07:00
Jan D
ac61e7e14f xfns.c (set_machine_and_pid_properties): Fix parantesis 2010-04-05 09:35:53 +02:00
Jan Djärv
6c1b5a1c01 Move declaration before other statements. 2010-04-04 17:29:42 +02:00
Jan Djärv
3e6bec3b8c Set WM_CLIENT_MACHINE and _NET_WM_PID properties (Bug#5828).
* xfns.c (set_machine_and_pid_properties): New function.
         (Fx_create_frame): Call set_machine_and_pid_properties.
2010-04-04 12:47:12 +02:00
Eli Zaretskii
feb72cfb93 Improve commentary of handle_stop_backwards. 2010-04-04 12:30:38 +03:00