Barry O'Reilly [Fri, 18 Oct 2013 04:27:34 +0000 (00:27 -0400)]
Don't run timers in input-pending-p. Its new check-timers param
provides the prior behavior..
* src/keyboard.c (Finput_pending_p): Accept optional check-timers
param.
* lisp/subr.el (sit-for): Call (input-pending-p t) so as to behave
as before.
* test/automated/timer-tests.el: New file. Tests that (sit-for 0)
allows another timer to run.
* net/tramp-cache.el (top): Suppress traces when reading
presistency file.
* net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Refactor common code. Improve debug message.
(tramp-maybe-open-connection)
* net/tramp-smb.el (tramp-smb-call-winexe): Do not request
connection buffer too early.
* net/tramp-smb.el (tramp-smb-actions-get-acl): New defconst, renamed
from `tramp-smb-actions-with-acl'.
(tramp-smb-actions-set-acl): New defconst.
(tramp-smb-handle-copy-directory)
(tramp-smb-action-get-acl): New defun, renamed from
`tramp-smb-action-with-acl'.
(tramp-smb-action-set-acl): New defun.
(tramp-smb-handle-set-file-acl): Rewrite.
Paul Eggert [Thu, 17 Oct 2013 01:02:32 +0000 (18:02 -0700)]
bool vector int width fixes
* data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
(Fbool_vector_count_matches_at):
Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
can exceed PTRDIFF_MAX, at least in theory.
(Fbool_vector_count_matches_at):
Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
Eli Zaretskii [Wed, 16 Oct 2013 15:44:02 +0000 (18:44 +0300)]
Implement network-interface-* functions for MS-Windows (bug #15610).
src/w32.c (network_interface_get_info, network_interface_list)
(network_interface_info): New functions.
(GetAdaptersInfo_Proc): New typedef.
(get_adapters_info): New wrapper function.
(globals_of_w32): Initialize g_b_init_get_adapters_info.
src/process.h (network_interface_list, network_interface_info): New
prototypes.
src/process.c (conv_sockaddr_to_lisp): Now externally-visible.
(Fnetwork_interface_list, Fnetwork_interface_info): Define for
all systems. Return non-nil for systems that HAVE_NET_IF_H and
for WINDOWSNT. Doc fix.
(syms_of_process): Defsubr Snetwork_interface_list and
Snetwork_interface_info unconditionally.
Eli Zaretskii [Tue, 15 Oct 2013 18:38:26 +0000 (21:38 +0300)]
Support mouse wheel on MS-Windows text-mode console.
src/w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
standard mouse buttons.
src/termhooks.h (struct input_event): Remove incorrect commentary.
Paul Eggert [Tue, 15 Oct 2013 16:38:36 +0000 (09:38 -0700)]
Disallow bool vector operations on mixed-length operands.
The old behavior left garbage in the result vector sometimes,
and didn't seem to be useful.
* data.c (Qwrong_length_argument): New static var.
(wrong_length_argument): New function.
(bool_vector_binop_driver): Check that args agree in length.
Eli Zaretskii [Mon, 14 Oct 2013 15:37:12 +0000 (18:37 +0300)]
Implement scrolling of TTY menus when the screen is too short.
src/term.c (tty_menu_display): Accept an additional argument, the
menu item from which to start displaying the menu. Account for
the value of Y when limiting the menu to the number of available
screen lines.
(mi_result): New enumeration.
(read_menu_input): Return enumerated value. When the y coordinate
hits min_y or max_y, return scroll indication instead of wrapping
around the menu.
(tty_menu_activate): Handle the scrolling indications from
read_menu_input. Compute the first menu item to display and pass
it to tty_menu_display.
lisp/menu-bar.el (tty-menu-navigation-map): Bind shifted mouse clicks
to commands that scroll the menu.
Paul Eggert [Mon, 14 Oct 2013 07:12:49 +0000 (00:12 -0700)]
* lisp.h (bool_vector_size): New function.
All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
* data.c (bool_vector_spare_mask, bool_vector_binop_driver)
(Fbool_vector_not, Fbool_vector_count_matches_at):
Remove uses of 'eassume' that should no longer be needed,
because they are subsumed by the 'eassume' in bool_vector_size.
Akinori MUSHA [Mon, 14 Oct 2013 00:23:29 +0000 (03:23 +0300)]
* progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from
`japanese-cp932' to `cp932' to fix the problem where saving a
source file written in Shift_JIS twice would end up having
`coding: japanese-cp932' which Ruby could not recognize.
(ruby-mode-set-encoding): Add support for encodings mapped to nil
in `ruby-encoding-map'.
(ruby-encoding-map): Map `us-ascii' to nil by default, meaning it
doesn't need to be explicitly declared in magic comment.
(ruby-encoding-map): Add type declaration for better customize UI.
Dmitry Gutov [Sun, 13 Oct 2013 21:35:31 +0000 (00:35 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding'
to `after-save-hook' instead of `before-save-hook'.
(ruby-mode-set-encoding): Use the value of coding system used to
write the file. Call `basic-save-buffer-1' after modifying the
buffer.
Alan Mackenzie [Sun, 13 Oct 2013 19:54:46 +0000 (19:54 +0000)]
Fix indentation/fontification of Java enum with "implements"/generic.
* progmodes/cc-engine.el (c-backward-over-enum-header): Extracted from
the three other places and enhanced to handle generics.
(c-inside-bracelist-p): Uses new function above.
* progmodes/cc-fonts.el (c-font-lock-declarations): Uses new function
above.
(c-font-lock-enum-tail): Uses new function above.
Glenn Morris [Sun, 13 Oct 2013 00:31:19 +0000 (17:31 -0700)]
Use accented form of some names
* doc/emacs/ack.texi (Acknowledgments):
* doc/emacs/emacs.texi (Acknowledgments):
* doc/lispref/intro.texi (Acknowledgments): Use accented form of some names.
* lisp/emacs-lisp/authors.el (authors-aliases, authors-ignored-files):
Add some entries.
(authors-fixed-entries): Use accented form of name.
Stefan Monnier [Sat, 12 Oct 2013 20:40:50 +0000 (16:40 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for paren-free
method calls (bug#bug#15594).
(ruby-smie--args-separator-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it to
recognize paren-free method calls.
Paul Eggert [Sat, 12 Oct 2013 20:00:38 +0000 (13:00 -0700)]
Merge from gnulib.
This incorporates:
2013-10-10 strtoumax: port to Solaris 8
2013-10-09 strtoimax, strtoumax: port to HP-UX 11.11
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/inttypes.in.h, lib/strtoimax.c, m4/inttypes.m4, m4/strtoimax.m4:
* m4/strtoumax.m4:
Update from gnulib.
Eli Zaretskii [Sat, 12 Oct 2013 13:11:14 +0000 (16:11 +0300)]
Make the MinGW32 build compatible with MinGW runtime 4.x.
nt/inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make
the layout of 'struct dirent' be compatible with MinGW32 runtime
versions 4.0 and later.
nt/inc/ms-w32.h (__MINGW_MAJOR_VERSION, __MINGW_MINOR_VERSION)
(__MINGW_PATCHLEVEL) [!__MINGW64_VERSION_MAJOR]: Define, if not
defined, but not for MinGW64.
(_USE_32BIT_TIME_T) [__MINGW64_VERSION_MAJOR]: Define, to force
use of 32-bit time_t type.
Eli Zaretskii [Sat, 12 Oct 2013 08:48:31 +0000 (11:48 +0300)]
Avoid compilation warnings in image.c.
src/image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
after inclusion of gif_lib.h, thus fixing compiler warnings caused
by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
Eli Zaretskii [Fri, 11 Oct 2013 18:20:08 +0000 (21:20 +0300)]
Fix popping down a menu by a second mouse click.
lisp/menu-bar.el (tty-menu-navigation-map): Bind all menu-bar
sequences to tty-menu-exit -- this pops down a dropped menu on
second mouse click on the menu bar.
Eli Zaretskii [Fri, 11 Oct 2013 15:42:06 +0000 (18:42 +0300)]
Support frame dimension changes while TTY menus are displayed.
src/xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
have different dimensions.
src/dispnew.c (fill_up_frame_row_with_spaces): Now has external
visibility.
src/dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
Eli Zaretskii [Fri, 11 Oct 2013 14:42:05 +0000 (17:42 +0300)]
Menu item selection on TTYs is now cyclical.
src/term.c (read_menu_input): Make selection of menu items
cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
(tty_menu_activate): Fix off-by-one error when computing max_y.
Eli Zaretskii [Fri, 11 Oct 2013 11:01:48 +0000 (14:01 +0300)]
Fix bug #15575 with crashes in TTY menus.
src/xdisp.c (display_tty_menu_item): Make sure we never write beyond
the end of the frame's glyph matrix.
src/term.c (tty_menu_display): Don't move cursor while overwriting
frame's glyphs with menu items. Limit the number of items
displayed to what can be shown on the available screen lines,
excluding the echo area.
(tty_menu_activate): Limit the Y coordinate allowed by
read_menu_input to the last screen line used for menu display.
Paul Eggert [Fri, 11 Oct 2013 06:32:29 +0000 (23:32 -0700)]
* lisp.h (eassume): New macro.
Also, include <verify.h>, for 'assume'.
* alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
(vroundup, vector_nbytes):
* data.c (bool_vector_spare_mask, bool_vector_binop_driver)
(Fbool_vector_not, Fbool_vector_count_matches)
(Fbool_vector_count_matches_at):
Use eassume, not eassert.
* casetab.c (set_identity, shuffle):
* composite.c (composition_gstring_put_cache):
* dispnew.c (update_frame_1):
* ftfont.c (ftfont_shape_by_flt):
* image.c (gif_load):
* intervals.c (offset_intervals):
* macfont.m (macfont_shape):
Remove calls to 'assume' that are no longer needed, because
--enable-gcc-warnings no longer generates bogus warnings
when these calls are removed.
Stefan Monnier [Fri, 11 Oct 2013 03:28:31 +0000 (23:28 -0400)]
* lisp/progmodes/sh-script.el: Provide simpl(e|istic) completion.
(explicit-shell-file-name): Declare.
(sh--vars-before-point, sh--cmd-completion-table): New functions.
(sh-completion-at-point-function): New function.
(sh-mode): Use it.
(sh-smie--keyword-p): Remove unused argument.
(sh-smie-sh-backward-token, sh-smie-rc-backward-token): Remove unused
vars.
(sh-set-shell): Always setup SMIE, even if we use the
old indentation code.
Dmitry Gutov [Fri, 11 Oct 2013 02:11:37 +0000 (05:11 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Split the
cases of ? and =.
(ruby-smie-rules): Simplify the "do" rule. The cases when the
predicate would return nil are almost non-existent.
(ruby-smie--redundant-do-p): Include "until" and "for" statements.
Stefan Monnier [Thu, 10 Oct 2013 21:43:47 +0000 (17:43 -0400)]
* test/automated/ruby-mode-tests.el (ruby-with-temp-buffer): Move before
first use.
(ruby-should-indent): Use indent-according-to-mode.
(ruby-deftest-move-to-block): Use `declare'.
Stefan Monnier [Thu, 10 Oct 2013 21:42:38 +0000 (17:42 -0400)]
* src/fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
(Qsubstitute_env_in_file_name): New var.
(syms_of_fileio): Define it.
* lisp/env.el (substitute-env-in-file-name): New function.
(substitute-env-vars): Extend the meaning of the optional arg.
Eli Zaretskii [Thu, 10 Oct 2013 19:26:13 +0000 (22:26 +0300)]
Attempt to fix crashes per bug #15575.
src/xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
src/term.c (save_and_enable_current_matrix): Don't allocate and
don't save margin areas.
(restore_desired_matrix): Don't restore margin areas.
(free_saved_screen): Don't free margin areas.
Eli Zaretskii [Thu, 10 Oct 2013 15:30:21 +0000 (18:30 +0300)]
MS-Windows follow-up to 2013-10-10T01:03:11Z!rgm@gnu.org: support giflib 5.x.
src/image.c (GIFLIB_MAJOR): Define to 4 if undefined.
(GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
(GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
(gif_load): For giflib v5.x and later, display the error message
produced by giflib when its functions fail.
(syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
lisp/term/w32-win.el (dynamic-library-alist): Define separate lists
of GIF DLLs for versions before and after 5.0.0 of giflib.