Stefan Monnier [Fri, 15 Apr 2011 01:44:00 +0000 (22:44 -0300)]
* lisp/progmodes/gud.el (gud-gdb): Use completion-at-point instead of
gud-gdb-complete-command.
(gud-gdb-completions): New function, from gud-gdb-complete-command.
(gud-gdb-completion-at-point): New function.
(gud-gdb-completions): Remove.
Michael Albinus [Thu, 14 Apr 2011 18:58:45 +0000 (20:58 +0200)]
* net/tramp-sh.el (tramp-sh-handle-file-attributes): Handle the
case when the scripts fail. Use `tramp-do-file-attributes-with-ls'
then.
(tramp-do-copy-or-rename-file-out-of-band): Do not check any
longer, whether`executable-find' is bound.
Paul Eggert [Thu, 14 Apr 2011 06:15:53 +0000 (23:15 -0700)]
2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
* alloc.c (refill_memory_reserve): Now static if
!defined REL_ALLOC || defined SYSTEM_MALLOC.
* lisp.h (refill_memory_reserve): Declare only if not static.
Paul Eggert [Thu, 14 Apr 2011 02:52:33 +0000 (19:52 -0700)]
* term.c: Make symbols static if they're not exported.
(tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
(max_frame_lines, tty_set_terminal_modes):
(tty_reset_terminal_modes, tty_turn_off_highlight):
(get_tty_terminal): Now static.
(term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
* termhooks.h (term_mouse_moveto): Do not declare if
HAVE_WINDOW_SYSTEMM.
* dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
(tty_turn_off_highlight, get_tty_terminal): Remove decls.
Paul Eggert [Thu, 14 Apr 2011 01:36:53 +0000 (18:36 -0700)]
* keyboard.c: Make symbols static if they're not exported.
(single_kboard, recent_keys_index, total_keys, recent_keys):
(this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
(this_single_command_key_start, echoing, last_auto_save):
(read_key_sequence_cmd, dribble, recursive_edit_unwind):
(command_loop, echo_now, keyboard_init_hook, help_char_p):
(quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
(Vlispy_mouse_stem, double_click_count):
Now static.
(force_auto_save_soon): Define only if SIGDANGER.
(ignore_mouse_drag_p): Now static if
!defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
(print_help): Remove; unused.
(stop_character, last_timer_event): Mark as externally visible.
* keyboard.h (ignore_mouse_drag_p): Declare only if
defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
(echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
* lisp.h (echoing): Remove decl.
(force_auto_save_soon): Declare only if SIGDANGER.
* xdisp.c (redisplay_window): Simplify code, to make it more
obvious that ignore_mouse_drag_p is not accessed if !defined
USE_GTK && !defined HAVE_NS.
Paul Eggert [Thu, 14 Apr 2011 00:44:47 +0000 (17:44 -0700)]
* insdel.c: Make symbols static if they're not exported.
However, leave prepare_to_modify_buffer alone. It's never
called from outside this function, but that appears to be a bug.
(combine_after_change_list, combine_after_change_buffer):
(adjust_after_replace): Now static.
(adjust_after_replace_noundo): Remove; unused.
* lisp.h (adjust_after_replace, adjust_after_replace_noundo):
Remove decls.
Stefan Monnier [Thu, 14 Apr 2011 00:16:11 +0000 (21:16 -0300)]
* lisp/minibuffer.el (completion-in-region-mode-predicate)
(completion-in-region-mode--predicate): New vars.
(completion-in-region, completion-in-region--postch)
(completion-in-region-mode): Use them.
(completion--capf-wrapper): Also return the hook function.
(completion-at-point, completion-help-at-point):
Adjust and provide a predicate.
Paul Eggert [Wed, 13 Apr 2011 23:44:57 +0000 (16:44 -0700)]
* image.c: Make symbols static if they're not exported.
* dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
if USE_GTK.
* image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
(xpm_color_cache, ct_table, ct_colors_allocated): Now static.
Paul Eggert [Wed, 13 Apr 2011 23:35:33 +0000 (16:35 -0700)]
* frame.c: Make symbols static if they're not exported.
(x_report_frame_params, make_terminal_frame): Now static.
(get_frame_param): Now static, unless HAVE_NS.
(x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
(x_get_resource_string): Remove; not used.
* frame.h (make_terminal_frame, x_report_frame_params):
(x_get_resource_string); Remove decls.
(x_fullscreen_adjust): Declare only if WINDOWSNT.
* lisp.h (get_frame_param): Declare only if HAVE_NS.
Paul Eggert [Wed, 13 Apr 2011 23:22:35 +0000 (16:22 -0700)]
* font.c, fontset.c: Make symbols static if they're not exported.
* dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
(FACE_SUITABLE_FOR_CHAR_P): Use it.
* font.c (font_close_object): Now static.
* font.h (font_close_object): Remove.
* fontset.c (FONTSET_OBJLIST): Remove.
(free_realized_fontset) #if-0 the body, which does nothing.
(face_suitable_for_char_p): #if-0, as it's never called.
* fontset.h (face_suitable_for_char_p): Remove decl.
* xfaces.c (face_at_string_position): Use
FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
since 0 is always ASCII.
Paul Eggert [Wed, 13 Apr 2011 22:50:03 +0000 (15:50 -0700)]
* emacs.c: Make symbols static if they're not exported.
(malloc_state_ptr, malloc_using_checking, syms_of_emacs):
(fatal_error_code, fatal_error_signal_hook, standard_args):
Now static.
(fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
(DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
(__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
* lisp.h (fatal_error_signal_hook): Remove decl.
(fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
Paul Eggert [Wed, 13 Apr 2011 22:28:14 +0000 (15:28 -0700)]
* editfns.c: Move a (normally-unused) function to its only use.
* editfns.c, lisp.h (get_operating_system_release): Remove.
* process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
worth the hassle of breaking this out.
Stefan Monnier [Wed, 13 Apr 2011 17:56:47 +0000 (14:56 -0300)]
Preserve arg names for advice of subr and lexical functions.
* lisp/help-fns.el (help-function-arglist): Consolidate the subr and
new-byte-code cases. Add argument `preserve-names' to extract names
from the docstring when needed.
* lisp/emacs-lisp/advice.el (ad-define-subr-args, ad-undefine-subr-args)
(ad-subr-args-defined-p, ad-get-subr-args, ad-subr-arglist): Remove.
(ad-arglist): Use help-function-arglist's new arg.
(ad-definition-type): Use cond.
lisp/autorevert.el: Use `remote-file-name-inhibit-cache'.
* autorevert.el (auto-revert-handler):
Bind `remote-file-name-inhibit-cache', not `tramp-cache-inhibit-cache',
which was removed in 2010-10-02T13:21:43Z!michael.albinus@gmx.de.
Don't quote lambda.
Paul Eggert [Wed, 13 Apr 2011 05:02:54 +0000 (22:02 -0700)]
emacs_write: Return size_t, not ssize_t, to avoid overflow issues.
* gnutls.c, gnutls.h (emacs_gnutls_write): Return size_t, not ssize_t.
* sysdep.c, lisp.h (emacs_write): Likewise.
Without the above change, emacs_gnutls_write and emacs_write had
undefined behavior and would typically mistakenly report an error
when writing a buffer whose size exceeds SSIZE_MAX.
(emacs_read, emacs_write): Remove check for negative size, as the
Emacs source code has been audited now.
(emacs_write): Adjust to new signature, making the code look more
like that of emacs_gnutls_write.
* process.c (send_process): Adjust to the new signatures of
emacs_write and emacs_gnutls_write. Do not attempt to store
a byte offset into an 'int'; it might overflow.
Paul Eggert [Wed, 13 Apr 2011 03:22:40 +0000 (20:22 -0700)]
* sound.c: Don't assume sizes fit in 'int'.
(struct sound_device.period_size, alsa_period_size):
Return size_t, not int.
(struct sound_device.write, vox_write, alsa_write):
Accept size_t, not int.
(wav_play, au_play): Use size_t to store sizes, and ssize_t to
record read return values.
gnus.texi (Window Layout): @itemize @code doesn't exist. It's @table @code.
gnus-registry.el (gnus-registry--split-fancy-with-parent-internal): Fix logic bug.
(gnus-registry-post-process-groups): Fix logging of no results and quote sender and subject.
network-stream.el (network-stream-open-starttls): Only do opportunistic STARTTLS upgrades if we have built-in gnutls support. Upgrades via gnutls-cli are too slow to be done opportunistically.
gnus-start.el (gnus-get-unread-articles): Slight cleanup.
(gnus-read-active-for-groups): Don't try to finish getting stuff where we had no early-data returned.
(gnus-get-unread-articles): Add a sanity check so that we don't issue two async commands to the same server at the same time.
gnus-sum.el (gnus-summary-select-article-buffer): Doc fix.
gnus-registry.el (gnus-registry-remake-db): Put the warning on a "warning" level.
Paul Eggert [Tue, 12 Apr 2011 08:12:01 +0000 (01:12 -0700)]
* sysdep.c (emacs_read, emacs_write): Check for negative sizes
since callers should never pass a negative size.
Change the signature to match that of plain 'read' and 'write'; see
<http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
* lisp.h: Update prototypes of emacs_write and emacs_read.
gnus-registry.el (gnus-registry-action): Remove properties and simplify subject in `gnus-registry-handle-action'.
(gnus-registry-spool-action): Get subject and sender from message if they are not passed in.
(gnus-registry-handle-action): Remove properties and simplify subject consistently.
Eli Zaretskii [Mon, 11 Apr 2011 16:39:09 +0000 (19:39 +0300)]
Fix bug #8468 with redisplay and 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 [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.