Eli Zaretskii [Mon, 11 Apr 2011 15:59:30 +0000 (18:59 +0300)]
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.
Eli Zaretskii [Wed, 30 Mar 2011 20:59:42 +0000 (22:59 +0200)]
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'.
Eli Zaretskii [Tue, 29 Mar 2011 19:58:13 +0000 (21:58 +0200)]
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.
Eli Zaretskii [Mon, 28 Mar 2011 19:30:35 +0000 (21:30 +0200)]
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.
Eli Zaretskii [Sun, 27 Mar 2011 20:01:46 +0000 (22:01 +0200)]
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.
Eli Zaretskii [Sat, 26 Mar 2011 22:05:30 +0000 (00:05 +0200)]
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.
Eli Zaretskii [Sat, 26 Mar 2011 18:31:36 +0000 (20:31 +0200)]
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.
Eli Zaretskii [Fri, 25 Mar 2011 12:55:10 +0000 (14:55 +0200)]
Adapt the MS-DOS build to lib/stdio.h and autogen/.
config.bat: Generate src/config.h and lib/Makefile from
autogen/config.in and autogen/Makefile.in.
msdos/sedlibmk.inp: Adapt to addition of the gnulib stdio module.
Add a description of what needs to be done when a new gnulib
module is added.
(MKDIR_P): Fix replacement command.
Eli Zaretskii [Fri, 25 Mar 2011 12:52:03 +0000 (14:52 +0200)]
Fix previous commit.
config.bat: Use autogen/config.in in one more place.
msdos/sedlibmk.inp (GNULIB_PRINTF, GNULIB_PRINTF_POSIX): Add missing
variables.
(MKDIR_P): Fix replacement command.
(NEXT_AS_FIRST_DIRECTIVE_STDIO_H, NEXT_STDIO_H): Edit to
"<stdio.h>", as lib/stdio.h cannot be left unused.
Eli Zaretskii [Fri, 25 Mar 2011 12:10:45 +0000 (14:10 +0200)]
Adapt config.bat and msdos/sedlibmk.inp to autogen and addition of stdio.
msdos/sedlibmk.inp: Adapt to addition of the gnulib stdio module.
config.bat: Generate src/config.h and lib/Makefile from
autogen/config.in and autogen/Makefile.in.
Stefan Monnier [Thu, 24 Mar 2011 22:05:01 +0000 (18:05 -0400)]
First step towards using standard completion in comint.
* lisp/minibuffer.el (completion--flush-all-sorted-completions):
Remove itself from hook.
(completion-at-point): Let the functions perform the completion
immediately and return nil or t.
* lisp/comint.el (comint-dynamic-complete-functions): Now identical to
completion-at-point-functions.
(comint-dynamic-list-input-ring): Remove unused var `index'.
(comint--match-partial-filename, comint--unquote&expand-filename):
New funs, split from comint-match-partial-filename.
(comint-dynamic-complete): Use completion-at-point.
(comint-dynamic-complete-filename): Use comint--match-partial-filename.
Julien Danjou [Tue, 22 Mar 2011 13:40:41 +0000 (13:40 +0000)]
mm-view.el (mm-display-inline-fontify): Make mode optional, and call normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer query.
(mm-inline-text): Render normal text with fontification whenever possible.
gnus-sum.el (gnus-summary-save-parts-1):
gnus-art.el (gnus-article-browse-html-save-cid-content)
(gnus-article-browse-html-parts, gnus-mime-delete-part)
(gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button):
Use `mm-handle-filename'.
mm-util.el (mm-handle-filename): New function, return the filename of an handle.
* image.el (image-type-file-name-regexps): Make it variable.
`imagemagick-register-types' modifies it, and the user may want
to add new extensions for known image types.
(imagemagick-register-types): Throw error if not using ImageMagick.
Paul Eggert [Tue, 22 Mar 2011 08:10:11 +0000 (01:10 -0700)]
* 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.
Chong Yidong [Tue, 22 Mar 2011 00:30:23 +0000 (20:30 -0400)]
Special handling of the `custom-enabled-themes' custom variable.
* lisp/custom.el (custom--inhibit-theme-enable): Make it affect only
custom-theme-set-variables and custom-theme-set-faces.
(provide-theme): Ignore custom--inhibit-theme-enable.
(load-theme): Enable the theme explicitly if NO-ENABLE is non-nil.
(custom-enabling-themes): Delete variable.
(enable-theme): Accept only loaded themes as arguments. Ignore
the special custom-enabled-themes variable.
(custom-enabled-themes): Forbid themes from setting this.
Eliminate use of custom-enabling-themes.
(custom-push-theme): Quote "changed" custom var entry.
Paul Eggert [Mon, 21 Mar 2011 18:03:15 +0000 (11:03 -0700)]
* ebrowse.c: Use size_t, not int, for sizes.
This avoids a warning with gcc -Wstrict-overflow, and works
better for very large objects.
(inbuffer_size): Now size_t. All uses changed.
(xmalloc, xrealloc, operator_name, process_file): Use size_t for
sizes. Don't bother testing whether a size_t value can be negative.
Leo Liu [Mon, 21 Mar 2011 17:48:36 +0000 (01:48 +0800)]
Fix history adding in ido-read-internal
Assume, for example, the head of matches is "RSS" and user input is
"rs". If the user hit RET, "RSS" is selected but "rs" is added to the
history. This commit fixes this inconsistency.
Paul Eggert [Mon, 21 Mar 2011 16:40:05 +0000 (09:40 -0700)]
etags: In Prolog functions, don't assume int fits in size_t.
This avoids a warning with gcc -Wstrict-overflow.
* etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t,
not int, to store sizes.
(prolog_atom): Return 0, not -1, on error. All callers changed.
Paul Eggert [Mon, 21 Mar 2011 07:46:53 +0000 (00:46 -0700)]
update-game-score: fix bug with -r
* update-game-score.c (main): Don't set 'scores' to garbage when
-r is specified and scorecount != MAX_SCORES. This bug was
introduced in the 2002-04-10 change, and was found with gcc
-Wstrict-overflow (GCC 4.5.2, x86-64).
Paul Eggert [Mon, 21 Mar 2011 05:04:41 +0000 (22:04 -0700)]
[ChangeLog]
fakemail: Remove dependency on ignore-value.
* Makefile.in (GNULIB_MODULES): Add stdio.
* lib/stdio.in.h, m4/stdio_h.m4: New files, automatically
imported from gnulib.
[lib-src/ChangeLog]
fakemail: Remove dependency on ignore-value.
This undoes some of the recent fakemail-related changes.
It is made possible due to recent changes to gnulib's stdio module.
* Makefile.in (fakemail${EXEEXT}): Do not depend on ignore-value.h.
* fakemail.c: Do not include ignore-value.h.
(put_line): Do not use ignore_value.
* 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.
* minibuf.c (Vcompleting_read_function): Don't declare, global variables
are now in src/globals.h.
(syms_of_minibuf): Remove spurious & from previous change.