Alan Mackenzie [Sat, 19 Oct 2013 15:11:07 +0000 (15:11 +0000)]
Fix fontification bugs with constructors and const.
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): (Just after
CASE 2) Remove the check for the absence of a suffix construct
after a function declaration with only types (no identifiers) in
the parentheses. Also, accept a function declaration with just a
type inside the parentheses, if this type can be positively
recognised as such, or if a prefix keyword like "explicit" nails
down the construct as a declaration.
Eli Zaretskii [Sat, 19 Oct 2013 08:35:51 +0000 (11:35 +0300)]
Fix TTY menus when they lead to a minibuffer prompt.
lisp/menu-bar.el (tty-menu-navigation-map): Bind mouse-N to perform
TTY menu actions and down-mouse-N to tty-menu-ignore. This solves
the problem whereby selecting a menu item that leads to a
minibuffer prompt moves the cursor out of the minibuffer window,
making it hard to type at the prompt. Suggested by Stefan Monnier
<monnier@iro.umontreal.ca>.
Eli Zaretskii [Fri, 18 Oct 2013 13:33:25 +0000 (16:33 +0300)]
Fix clicks on the menu bar when GPM mouse is in use.
src/keyboard.c (make_lispy_event): Remove GPM-specific code that
handles mouse clicks. Instead, let GPM use the same code as all
the other mice use. See the discussion starting at
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
for the details of the problem with the menu bar this fixes.
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.