1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 03:20:39 -08:00
Commit graph

8340 commits

Author SHA1 Message Date
Juanma Barranquero
938efb776d Remove references to (default-)direction-reversed. 2010-04-21 01:05:30 +02:00
Stefan Monnier
8b1e1112af Warn rather than error when making a local var inside a let.
* data.c (Fmake_variable_buffer_local, Fmake_local_variable):
Just signal a warning rather than an error when inside a let.
(Fmake_variable_frame_local): Add the same test.
2010-04-20 13:35:16 -04:00
Stefan Monnier
933ac235bd * font.c (syms_of_font): Make the style table vars read-only. 2010-04-20 13:17:29 -04:00
Stefan Monnier
b4bf28b732 * buffer.h (struct buffer): Remove unused var `direction_reversed'.
* buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization.

* bidi.c (bidi_initialize): Simplify fallback_paragraph_*_re init.
2010-04-20 13:01:39 -04:00
Eli Zaretskii
283ccc1841 Implement GUI display of R2L lines, fix TTY display of R2L lines.
xdisp.c [HAVE_WINDOW_SYSTEM]: Add prototype for
 append_stretch_glyph.
 (set_cursor_from_row) <cursor_x>: Remove unused variable.  Fix
 off-by-one error in computing x at end of text in the row.
 (append_stretch_glyph): In reversed row, prepend the glyph rather
 than append it.  Set resolved_level and bidi_type of the glyph.
 (extend_face_to_end_of_line): If the row is reversed, prepend a
 stretch glyph whose width is such that the rightmost glyph will be
 drawn at the right margin of the window.  Fix off-by-one error on
 TTY frames in testing whether a line needs face extension.  Fix
 face extension at ZV.  If this is the last glyph row, use
 DEFAULT_FACE_ID, to avoid painting the rest of the window with the
 region face.
 (set_cursor_from_row, display_line): Use
 MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
 row->continuation_lines_width.
 (next_element_from_buffer): Don't call bidi_paragraph_init if we
 are at ZV.  Fixes a crash when reseated to ZV by
 try_window_reusing_current_matrix.
 (display_and_set_cursor, erase_phys_cursor): Handle negative HPOS,
 which happens with R2L glyph rows.  Fixes a crash when inserting a
 character at end of an R2L line.
 (set_cursor_from_row): Don't be fooled by truncated rows: don't
 treat them as having zero-width characters.  Improve comments.
 Don't reverse pos_before and pos_after for reversed glyph rows.
 Set cursor.x to negative value when the cursor might be on the
 left fringe.
 (IT_OVERFLOW_NEWLINE_INTO_FRINGE): For R2L lines, consider the
 left fringe, not the right one.
 (notice_overwritten_cursor, draw_phys_cursor_glyph)
 (erase_phys_cursor): For reversed cursor_row, support cursor on
 the left fringe.
 fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
 of continuation indicators on the fringes.
 (draw_fringe_bitmap): For reversed glyph rows, allow cursor on the
 left fringe.
 w32term.c (w32_draw_window_cursor): For reversed glyph rows,
 draw cursor on the left fringe.
 xterm.c (x_draw_window_cursor): For reversed glyph rows, draw
 cursor on the left fringe.
 dispnew.c (update_text_area): Handle reversed desired rows when
 the cursor is on the left fringe.
 (set_window_cursor_after_update): Limit cursor's hpos by -1 from
 below, not by 0, for when the cursor is on the left fringe.

 xdisp.c (unproduce_glyphs): New function.
 (display_line): Use it when produced glyphs are discarded from R2L
 glyph rows.
 (append_composite_glyph): In R2L rows, prepend the glyph rather
 than appending it.
  term.c (append_composite_glyph): In R2L rows, prepend the glyph
 rather than append it.  Set up the resolved_level and bidi_type
 attributes of the appended glyph.
 (produce_special_glyphs): Mirror the backslash continuation
 character in R2L lines.
2010-04-20 16:31:28 +03:00
Eli Zaretskii
93d68d0c2b Fix R2L paragraph display on TTY.
xdisp.c (unproduce_glyphs): New function.
 (display_line): Use it when produced glyphs are discarded from R2L
 glyph rows.
 (append_composite_glyph): In R2L rows, prepend the glyph rather
 than appending it.
 term.c (append_composite_glyph): In R2L rows, prepend the glyph
 rather than append it.  Set up the resolved_level and bidi_type
 attributes of the appended glyph.
2010-04-20 16:08:35 +03:00
Jan Djärv
3bb49aaf02 gtkutils.c (xg_event_is_for_scrollbar): Check if grabbed widget is a scrollbar. 2010-04-20 13:38:30 +02:00
Kenichi Handa
1f2f0b2818 merge trunk 2010-04-20 16:26:02 +09:00
Kenichi Handa
c0be27fda0 charset.c (char_charset): Consider Vcharset_non_preferred_head only when the arg CHARSET_LIST is nil. 2010-04-20 15:30:26 +09:00
Stefan Monnier
ce5b453a44 Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that.  This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
Eli Zaretskii
fd3998ffe2 Cosmetic changes in src/bidi.c.
bidi.c (bidi_get_type, bidi_get_category)
 (bidi_at_paragraph_end, bidi_resolve_weak, bidi_resolve_neutral)
 (bidi_type_of_next_char, bidi_level_of_next_char): Declare
 static.  Use `INLINE' rather than `inline'.
2010-04-19 19:22:55 +03:00
Stefan Monnier
6e104790e7 Merge from emacs-23 2010-04-19 11:07:52 -04:00
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
Juanma Barranquero
e42cd1a757 * dired.c (Ffile_attributes): Fix typo in docstring. 2010-04-19 05:06:29 +02: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
Eli Zaretskii
43a03da53d Fix cursor positioning at end of R2L line on TTY frames.
xdisp.c (extend_face_to_end_of_line): Fix off-by-one error on
 TTY frames in testing whether a line needs face extension.
2010-04-17 19:02:18 +03: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
26cdf52838 Mirror continuation indicators for R2L lines; fix face extension on TTY.
xdisp.c (extend_face_to_end_of_line): Fix face extension at ZV.
 term.c (produce_special_glyphs): Mirror the backslash
 continuation character in R2L lines.
 xdisp.c (set_cursor_from_row, display_line): Use
 MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
 row->continuation_lines_width.
 fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
 of continuation indicators on the fringes.
2010-04-17 15:33:05 +03:00
Eli Zaretskii
459035295c Fix two crashes with display of R2L lines in GUI sessions.
xdisp.c (next_element_from_buffer): Don't call
 bidi_paragraph_init if we are at ZV.  Fixes a crash when reseated to
 ZV by try_window_reusing_current_matrix.
 (display_and_set_cursor, erase_phys_cursor): Handle negative HPOS,
 which happens with R2L glyph rows.  Fixes a crash when inserting a
 character at end of an R2L line.
2010-04-17 13:29:40 +03:00
Eli Zaretskii
8fccb1179b Continue work on R2L paragraphs in GUI sessions.
xdisp.c (set_cursor_from_row): Don't be fooled by truncated
 rows: don't treat them as having zero-width characters.  Improve
 comments.
 (extend_face_to_end_of_line): Use window_box_width to compute the
 width of the stretch glyph, to account for margins.  If this is
 the last glyph row, use DEFAULT_FACE_ID, to avoid painting the
 rest of the window with the region face.
2010-04-17 12:46:44 +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
Adrian Robert
79353a53a0 * nsmenu.m (EmacsDialog-runDialogAt:): Declare ret as NSInteger (Bug#5811). 2010-04-13 11:56:08 +03: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
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
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