Eli Zaretskii
a6744a352f
Fix bug #8487 with invisible property near EOB under bidi.
...
src/xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
when at ZV.
2011-04-13 20:41:04 +03:00
Eli Zaretskii
11997c7643
Fix bug #8468 with redisplay when scroll-margin > 0.
...
src/xdisp.c (redisplay_window): Don't try to determine the character
position of the scroll margin if the window start point w->startp
is outside the buffer's accessible region.
2011-04-11 18:59:30 +03:00
Eli Zaretskii
09725d2628
Documentation parts of the scroll fix.
...
src/xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the
threshold of 100 lines for never-recentering scrolling.
doc/emacs/display.texi (Auto Scrolling): Document the limit of 100
lines for never-recentering scrolling with `scroll-conservatively'.
2011-03-30 22:59:42 +02:00
Eli Zaretskii
492001e973
Fix off-by-one in scroll down aggressively.
...
src/xdisp.c (try_scrolling): When scrolling down aggressively,
scroll one screen line less, to make sure we end up at the margin
for fractions close to 1.
2011-03-29 21:58:13 +02:00
Eli Zaretskii
9f3842cef7
Fix failures in try_scrolling when scrolling back.
...
src/xdisp.c (try_scrolling): When point is above the window, allow
searching as far as scroll_max, or one screenful, to compute
vertical distance from PT to the scroll margin position. This
prevents try_scrolling from unnecessarily failing when
scroll-conservatively is set to a value slightly larger than the
window height.
2011-03-28 21:30:35 +02:00
Eli Zaretskii
fd738ca513
Fix scrolling back with scroll-down-aggressively.
...
src/xdisp.c (try_scrolling): Clean up the case of PT below the
margin at bottom of window: scroll_max can no longer be INT_MAX.
(redisplay_window): Find character position of margin and use
that, rather than adding margin to PT.
2011-03-27 22:01:46 +02:00
Eli Zaretskii
3b2c5ab1f0
Fix scrolling with scroll-*-aggressively.
...
Aggressive scrolling backward by large distance still doesn't DTRT.
src/xdisp.c (try_scrolling): When aggressive scrolling is in use, don't
let point enter the opposite scroll margin as result of the scroll.
(redisplay_window): Fix operator precedence in condition.
2011-03-27 00:05:30 +02:00
Eli Zaretskii
06b6bbb578
Fix bug #6671 with point position in the window when scrolling far away.
...
src/xdisp.c (redisplay_window): Don't check buffer's clip_changed
flag as a prerequisite for invoking try_scrolling.
(try_scrolling): Limit scrolling to 100 screen lines.
(SCROLL_LIMIT): New macro.
(try_scrolling): Use it when setting scroll_limit.
(redisplay_window): Even when falling back on "recentering",
position point in the window according to scroll-conservatively,
scroll-margin, and scroll-*-aggressively variables.
2011-03-26 20:31:36 +02:00
Eli Zaretskii
5d9bd9764f
Don't scroll more than 100 lines in try_scrolling.
...
src/xdisp.c (try_scrolling): Limit scrolling to 100 screen lines.
2011-03-26 16:03:23 +02:00
Eli Zaretskii
6653704919
Call try_scrolling even if buffer's clip_changed flag is set.
...
src/xdisp.c (redisplay_window): Don't check buffer's clip_changed
flag as a prerequisite for invoking try_scrolling. (Bug#6671)
2011-03-26 14:20:20 +02:00
Juanma Barranquero
59eb0929f7
src/*.c: Fix more warnings about unused parameters.
...
* keymap.c (describe_vector): Remove parameters `indices' and
`char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
(describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
* w32.c (read_unc_volume): Use parameter `henum', instead of
global variable `wget_enum_handle'.
2011-03-26 03:48:03 +01:00
Juanma Barranquero
f868cd8a71
src/*.h: Remove unused parameters and functions.
...
* keyboard.h (timer_check, show_help_echo): Remove unused parameters.
* keyboard.c (timer_check): Remove parameter `do_it_now',
unused since 1996-04-12T06:01:29Z!rms@gnu.org.
(show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
* keyboard.c (read_char):
* w32menu.c (w32_menu_display_help):
* xmenu.c (show_help_event, menu_help_callback):
Adjust calls to `show_help_echo'.
* gtkutil.c (xg_maybe_add_timer):
* keyboard.c (readable_events):
* process.c (wait_reading_process_output):
* xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
* insdel.c (adjust_markers_gap_motion):
Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
(gap_left, gap_right): Don't call it.
2011-03-26 02:23:15 +01:00
Chong Yidong
2ecf6fdb28
Discard changes to buffer->clip_changed incurred during fontification.
...
* src/xdisp.c (handle_fontified_prop): Discard changes to clip_changed
incurred during fontification.
2011-03-25 16:00:25 -04:00
Juanma Barranquero
6b1f9ba477
src/*.c: Remove unused function parameters.
...
* buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
(DEFVAR_PER_BUFFER): Don't pass it.
* dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
(scrolling_window): Don't pass it.
2011-03-25 19:06:33 +01:00
Juanma Barranquero
a9b53ad377
src/fileio.c: Move computation of encoded_absname inside `if'.
2011-03-25 18:37:15 +01:00
Juanma Barranquero
0f4a96b5d7
nt/*.c, src/*.c: Remove unused variables.
...
* nt/addpm.c (main): Remove unused variable `retval'.
* nt/preprep.c (main): Remove unused variable `ptr'.
* src/dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
* src/fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
and `suffix'.
(Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
of variables specific to SELinux and computation of `encoded_absname'.
* src/image.c (XPutPixel): Remove unused variable `height'.
* src/keyboard.c (make_lispy_event): Remove unused variable `hpos'.
* src/unexw32.c (get_section_info): Remove unused variable `section'.
* src/w32.c (stat): Remove unused variables `drive_root' and `devtype'.
(system_process_attributes): Remove unused variable `sess'.
(sys_read): Remove unused variable `err'.
* src/w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
(w32_wnd_proc): Remove unused variable `isdead'.
(unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
(Fx_server_max_request_size): Remove unused variable `dpyinfo'.
(x_create_tip_frame): Remove unused variable `tem'.
* src/w32inevt.c (w32_console_read_socket): Remove unused variable `no_events'.
* src/w32term.c (x_draw_composite_glyph_string_foreground):
Remove unused variable `width'.
2011-03-25 16:39:59 +01:00
Juanma Barranquero
1149507c7f
src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to CombineRgn.
2011-03-24 03:30:26 +01:00
Juanma Barranquero
9c88f33949
w32: Fix some warnings reported by -Wall -Wextra.
...
* lib-src/ntlib.c: Include <ctype.h>.
* nt/cmdproxy.c: Include <ctype.h>.
(make_absolute): Remove unused variable `i'.
* src/w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
(w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
(Fx_close_connection): Remove unused variable `i'.
* src/w32font.c (w32font_draw): Return number of glyphs.
(w32font_open_internal): Remove unused variable `i'.
(w32font_driver): Add missing initializer.
* src/w32menu.c (utf8to16): Remove unused variable `utf16'.
(fill_in_menu): Remove unused variable `items_added'.
* src/w32term.c (last_mouse_press_frame): Remove static global variable.
(w32_clip_to_row): Remove unused variable `f'.
(x_delete_terminal): Remove unused variable `i'.
* src/w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
(NOTHING): Remove unused static global variable.
(uniscribe_check_otf): Remove unused variable `table'.
(uniscribe_font_driver): Add missing initializers.
2011-03-23 17:25:38 +01:00
Julien Danjou
dee091a37f
Use Frun_hooks rather than calling Vrun_hooks manually
2011-03-23 11:06:57 +01:00
Glenn Morris
fe7be2210f
Fix ChangeLog typo.
2011-03-22 20:32:55 -07:00
Paul Eggert
c9c49752e1
Fix more problems found by GCC 4.5.2's static checks.
2011-03-22 18:01:59 -07:00
Paul Eggert
b9b4b7cb4c
Merge removals from trunk.
2011-03-22 17:53:37 -07:00
Paul Eggert
2c520ab5fb
Merge from mainline.
2011-03-22 17:24:09 -07:00
Chong Yidong
c59da222fa
Remove an apparently unnecessary XClearWindow call.
...
* src/xterm.c (x_clear_frame): Remove XClearWindow call. This appears
not to be necessary, and produces flickering.
2011-03-22 14:15:52 -04:00
Paul Eggert
b12ef41167
Add Bug#
2011-03-22 09:43:12 -07:00
Paul Eggert
8abc3f1295
* coding.c (encode_coding_raw_text): Avoid unnecessary test
...
the first time through the loop, since we know p0 < p1 then.
This also avoids a gcc -Wstrict-overflow warning.
2011-03-22 09:20:45 -07:00
Paul Eggert
a2d2666036
* lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
...
leading to a memory leak, possible in functions like
load_charset_map_from_file that can allocate an unbounded number
of objects.
2011-03-22 02:08:11 -07:00
Paul Eggert
916c72e97a
* xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
...
that could (at least in theory) be that large.
2011-03-22 01:59:50 -07:00
Paul Eggert
b7cbbd6f01
* xdisp.c (pint2hrstr): Simplify and tune code slightly.
...
This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
2011-03-22 01:15:43 -07:00
Paul Eggert
19ab8a188a
* xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
...
This is less likely to overflow, and avoids undefined behavior if
overflow does occur. All callers changed. Use strtoul to scan
for the unsigned long integer.
2011-03-22 01:10:11 -07:00
Paul Eggert
f0641eff4f
* scroll.c (do_scrolling): Work around GCC bug 48228.
...
See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228 >.
2011-03-22 00:48:10 -07:00
Paul Eggert
39f5e5198f
* frame.c (validate_x_resource_name): Simplify count usage.
...
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:12:38 -07:00
Paul Eggert
5ffe6683c3
Better version of previous patch.
2011-03-21 11:11:03 -07:00
Paul Eggert
7f650bb9a8
* frame.c (Fmodify_frame_parameters): Simplify loop counter.
...
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:09:45 -07:00
Paul Eggert
37dd57d1e5
Add Bug#.
2011-03-20 22:50:24 -07:00
Paul Eggert
6e5fa6bfce
Merge from trunk and from gnulib stdio.
2011-03-20 22:34:48 -07:00
Paul Eggert
81e56e612d
* fileio.c (Fcopy_file): Report error if fchown or fchmod fail.
2011-03-20 19:40:27 -07:00
Glenn Morris
66b874939b
(Re)move autotools generated files from the repository.
...
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00225.html
* autogen/: New directory, to be excluded from releases.
* autogen/copy_autogen, autogen/update_autogen: New scripts.
* autogen/README: New file.
* autogen/aclocal.m4, autogen/config.in, autogen/configure:
* autogen/Makefile.in: Add auto-updated generated files.
* autogen.sh: No longer a no-op, now it tests for autotools
and runs them as necessary.
* configure.in: Defaule maintainer-mode to on.
* aclocal.m4, configure, lib/Makefile.in: Remove files.
* src/config.in: Remove file.
* INSTALL.BZR, admin/make-tarball.txt: Update instructions.
2011-03-20 16:58:23 -07:00
Paul Eggert
699979fc4c
Add Bug#.
2011-03-20 16:56:23 -07:00
Paul Eggert
dc1ca6a87f
* emacs.c (Fdaemon_initialized): Do not ignore I/O errors.
2011-03-20 14:03:44 -07:00
Paul Eggert
c184bbfdfd
Merge: Use socklen_t, not int, for socket lengths.
2011-03-20 09:55:33 -07:00
Paul Eggert
6a90a4f198
Merge from gnulib, for socklen_t.
2011-03-20 09:28:22 -07:00
Juanma Barranquero
45b6f6d5cb
src/minibuf.c: Fix previous change.
...
* minibuf.c (Vcompleting_read_function): Don't declare, global variables
are now in src/globals.h.
(syms_of_minibuf): Remove spurious & from previous change.
2011-03-20 14:57:22 +01:00
Leo Liu
3ec03f7e46
New variable completing-read-function to customize completing-read
2011-03-20 18:35:27 +08:00
Paul Eggert
c939f91b4d
Add Bug#8298.
2011-03-19 22:15:59 -07:00
Paul Eggert
12d8b6ab59
* process.c (create_process): Use 'volatile' to avoid vfork clobbering.
2011-03-19 20:07:54 -07:00
Paul Eggert
7b8081265e
* process.c (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
2011-03-19 19:48:50 -07:00
Paul Eggert
f990b4e5d9
* process.c (process_send_signal): Add cast to avoid pointer signedness problem.
2011-03-19 19:45:19 -07:00
Paul Eggert
0da4933597
* process.c (Fnetwork_interface_info): Fix pointer signedness.
2011-03-19 19:42:34 -07:00
Paul Eggert
4dc343ee36
* process.c (Fmake_network_process): Define label "retry_connect" only if needed.
2011-03-19 19:41:23 -07:00