bpt/emacs.git
10 years agoMerge from gnulib.
Paul Eggert [Wed, 23 Oct 2013 04:01:46 +0000 (21:01 -0700)]
Merge from gnulib.

This incorporates:
2013-10-14 acl: allow cross-compilation to Gentoo
2013-10-18 extern-inline: make safe for -Wundef usage
2013-09-30 fpending: use pure+const function attrs
* lib/fpending.h, m4/acl.m4, m4/extern-inline.m4: Update from gnulib.

10 years agolisp/gnus/mm-decode.el (mm-dissect-buffer): Revert last change
Katsumi Yamaoka [Wed, 23 Oct 2013 03:35:49 +0000 (03:35 +0000)]
lisp/gnus/mm-decode.el (mm-dissect-buffer): Revert last change
lisp/gnus/nndoc.el (nndoc-dissect-mime-parts-sub): Ditto

The problem that motivated those changes was attributed to a broken
mail sender, and has been fixed.

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie--at-dot-call): Use
Dmitry Gutov [Wed, 23 Oct 2013 02:59:45 +0000 (06:59 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie--at-dot-call): Use
`following-char'.

10 years ago* test/indent/ruby.rb: Move two examples to "working" section, add one
Dmitry Gutov [Tue, 22 Oct 2013 20:47:29 +0000 (00:47 +0400)]
* test/indent/ruby.rb: Move two examples to "working" section, add one
more.

10 years ago* lisp/emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
Stefan Monnier [Tue, 22 Oct 2013 15:45:56 +0000 (11:45 -0400)]
* lisp/emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Remove corresponding workaround.  Fix indentation rule of ";" so it
also applies when ";" is the parent.

10 years agolisp/gnus/nndoc.el (nndoc-dissect-mime-parts-sub): Fix last change
Katsumi Yamaoka [Tue, 22 Oct 2013 13:55:27 +0000 (13:55 +0000)]
lisp/gnus/nndoc.el (nndoc-dissect-mime-parts-sub): Fix last change

10 years agolisp/gnus/mm-decode.el (mm-dissect-buffer): Guess content-type if the first token...
Katsumi Yamaoka [Tue, 22 Oct 2013 10:22:59 +0000 (10:22 +0000)]
lisp/gnus/mm-decode.el (mm-dissect-buffer): Guess content-type if the first token is missing in the Content-Type header
lisp/gnus/nndoc.el (nndoc-dissect-mime-parts-sub): Ditto

10 years agoMention the optional ‘display’ argument in doc strings.
Xue Fuqiao [Tue, 22 Oct 2013 08:07:51 +0000 (16:07 +0800)]
Mention the optional ‘display’ argument in doc strings.

* frame.el (display-screens, display-pixel-height)
(display-pixel-width, display-mm-width, display-backing-store)
(display-save-under, display-planes, display-color-cells)
(display-visual-class, display-monitor-attributes-list): Mention
the optional ‘display’ argument in doc strings.

10 years ago* lisp/progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some
Michael Gauland [Tue, 22 Oct 2013 00:47:32 +0000 (20:47 -0400)]
* lisp/progmodes/ebnf2ps.el (ebnf-prologue): Avoid PS error with some
viewers such as evince when ebnf-production-name-p is nil.

Fixes: debbugs:15625

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
Dmitry Gutov [Mon, 21 Oct 2013 22:25:59 +0000 (02:25 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
TODO.  Add "." after " @ ".
(ruby-smie--at-dot-call): New function.  Checks if point at method
call with explicit target.
(ruby-smie--forward-token, ruby-smie--backward-token): Prepend "."
to the method name tokens when it precedes them.
(ruby-smie--backward-id, ruby-smie--forward-id): Remove.
(ruby-smie-rules): Add rule for indentation before and after "."
token.

10 years agoRemove unnecessary @refill.
Xue Fuqiao [Mon, 21 Oct 2013 22:10:55 +0000 (06:10 +0800)]
Remove unnecessary @refill.

10 years ago* lisp/textmodes/remember.el (remember-diary-extract-entries):
Stefan Monnier [Mon, 21 Oct 2013 14:15:13 +0000 (10:15 -0400)]
* lisp/textmodes/remember.el (remember-diary-extract-entries):
Avoid add-to-list.

10 years agoDo not allow font caches to grow too large.
Dmitry Antipov [Mon, 21 Oct 2013 14:11:25 +0000 (18:11 +0400)]
Do not allow font caches to grow too large.
* alloc.c (compact_font_cache_entry, compact_font_caches):
New functions or stub if not HAVE_WINDOW_SYSTEM.
(compact_undo_list): Factor out from Fgarbage_collect.
Add comment.
(mark_face_cache): Mark face font.  Move down to avoid
extra prototypes.
(mark_terminals): Do not mark font cache here.
(Fgarbage_collect): Call compaction functions described
above.  Adjust comment.

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as
Stefan Monnier [Mon, 21 Oct 2013 13:34:13 +0000 (09:34 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as
an instruction.

10 years ago* indent/ruby.rb: Fix a typo
Dmitry Gutov [Mon, 21 Oct 2013 06:15:47 +0000 (10:15 +0400)]
* indent/ruby.rb: Fix a typo

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add (almost) all
Dmitry Gutov [Mon, 21 Oct 2013 05:54:18 +0000 (09:54 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add (almost) all
infix operators.
(ruby-smie--implicit-semi-p): Add new operator chars.

10 years ago* lisp/progmodes/ruby-mode.el (ruby-mode-map): Add binding for
Dmitry Gutov [Mon, 21 Oct 2013 03:50:06 +0000 (07:50 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Add binding for
`smie-down-list'.
(ruby-smie--args-separator-p): Check that there's no newline
between method call and its arguments.
(ruby-smie-rules): Handle new cases: curly block with and without
parameters, hash surrounded with parens, block passed to
paren-less method call.

* test/indent/ruby.rb: New examples for indentation of blocks.  Example
of hash inside parens that inflooped before this commit.

10 years agoRemove unnecessary @refill.
Xue Fuqiao [Sun, 20 Oct 2013 22:33:05 +0000 (06:33 +0800)]
Remove unnecessary @refill.

10 years ago* emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
Jan Djärv [Sun, 20 Oct 2013 16:47:42 +0000 (18:47 +0200)]
* emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
chdir to HOME.

Fixes: debbugs:15607

10 years agoAllow comma separated lists after Java "implements".
Alan Mackenzie [Sun, 20 Oct 2013 14:27:22 +0000 (14:27 +0000)]
Allow comma separated lists after Java "implements".

* progmodes/cc-engine.el (c-backward-over-enum-header): parse
commas.
* progmodes/cc-fonts.el (c-basic-matchers-after): Remove comma
from a "disallowed" list in enum fontification.

10 years ago* lisp/startup.el (default-frame-background-mode): Remove unused
Johan Bockgård [Sun, 20 Oct 2013 11:28:58 +0000 (13:28 +0200)]
* lisp/startup.el (default-frame-background-mode): Remove unused
defvar.

10 years ago* lisp/progmodes/verilog-mode.el (verilog-mode): Don't set
Johan Bockgård [Sun, 20 Oct 2013 10:13:26 +0000 (12:13 +0200)]
* lisp/progmodes/verilog-mode.el (verilog-mode): Don't set
comment-indent-function globally.

10 years ago* src/nsterm.m (ns_get_color): Make selection color work for GNUStep also.
Jan Djärv [Sun, 20 Oct 2013 09:55:25 +0000 (11:55 +0200)]
* src/nsterm.m (ns_get_color): Make selection color work for GNUStep also.

10 years ago* lisp/cedet/semantic/db-mode.el (global-semanticdb-minor-mode): Remove hooks
Johan Bockgård [Sun, 20 Oct 2013 09:51:21 +0000 (11:51 +0200)]
* lisp/cedet/semantic/db-mode.el (global-semanticdb-minor-mode): Remove hooks
correctly.
(semanticdb-toggle-global-mode): Pass `toggle' to minor mode function.

10 years agoMake Info menu for GNUStep only for GUI.
Jan Djärv [Sun, 20 Oct 2013 09:26:15 +0000 (11:26 +0200)]
Make Info menu for GNUStep only for GUI.

* menu-bar.el: Put help-menu in menu-bar-final-items unconditionally.
Move Info menu item creation to ns-win.el.

* term/ns-win.el (ns-initialize-window-system): Rename Help to Info
in menu bar.

10 years agoFix GNUStep specific menu items.
Jan Djärv [Sun, 20 Oct 2013 08:50:34 +0000 (10:50 +0200)]
Fix GNUStep specific menu items.

* lisp/menu-bar.el: Move GNUStep specific menus...

* lisp/term/ns-win.el (ns-initialize-window-system): ... to here.

* src/nsterm.m (Qcocoa, Qgnustep): New variables.
(syms_of_nsterm): Defsym Qcocoa, Qgnustep.  Fprovide appropriate one.

10 years ago* lisp/simple.el (newline): Only run post-self-insert-hook when
Stefan Monnier [Sat, 19 Oct 2013 22:17:56 +0000 (18:17 -0400)]
* lisp/simple.el (newline): Only run post-self-insert-hook when
called interactively.

10 years agoNEWS fix.
Johan Bockgård [Sat, 19 Oct 2013 15:30:39 +0000 (17:30 +0200)]
NEWS fix.

10 years ago* lisp/icomplete.el (icomplete-with-completion-tables): Add :version.
Johan Bockgård [Sat, 19 Oct 2013 15:22:57 +0000 (17:22 +0200)]
* lisp/icomplete.el (icomplete-with-completion-tables): Add :version.

10 years agoFix fontification bugs with constructors and const.
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.

10 years agoAdd indexes for the ‘:box’ face attribute.
Xue Fuqiao [Sat, 19 Oct 2013 13:53:01 +0000 (21:53 +0800)]
Add indexes for the ‘:box’ face attribute.

* doc/lispref/display.texi (Face Attributes): Add indexes for the ‘:box’ face attribute.

10 years agoFix TTY menus when they lead to a minibuffer prompt.
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>.

10 years ago* menu-bar.el: Don't make Services menu.
Jan Djärv [Sat, 19 Oct 2013 08:23:43 +0000 (10:23 +0200)]
* menu-bar.el: Don't make Services menu.

10 years agoffap.el: handle "/usr/include/c++/<version>" directories.
Rüdiger Sonderfeld [Sat, 19 Oct 2013 02:35:20 +0000 (19:35 -0700)]
ffap.el: handle "/usr/include/c++/<version>" directories.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00387.html

* lisp/ffap.el (ffap-alist): Use ffap-c++-mode for c++-mode.
(ffap-c++-path): New variable.
(ffap-c++-mode): New function.

10 years ago* lisp/ido.el (dired-other-frame): Only list directories.
Joe Vornehm Jr. [Sat, 19 Oct 2013 00:39:31 +0000 (20:39 -0400)]
* lisp/ido.el (dired-other-frame): Only list directories.

Fixes: debbugs:15638

10 years agoAnother index for line height.
Xue Fuqiao [Fri, 18 Oct 2013 14:27:44 +0000 (22:27 +0800)]
Another index for line height.

10 years ago* doc/lispref/display.texi (Line Height): Add an index for line height.
Xue Fuqiao [Fri, 18 Oct 2013 14:22:55 +0000 (22:22 +0800)]
* doc/lispref/display.texi (Line Height): Add an index for line height.

10 years agoFix clicks on the menu bar when GPM mouse is in use.
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.

10 years agoRemove port-specific display name lists to avoid extra
Dmitry Antipov [Fri, 18 Oct 2013 12:57:44 +0000 (16:57 +0400)]
Remove port-specific display name lists to avoid extra
complexity and data duplication with display info lists.
* xterm.h (x_display_name_list): Remove declaration.
* xterm.c (x_display_name_list): Remove.
(x_term_init, x_delete_display, syms_of_xterm): Adjust users.
* xfns.c (x_display_info_for_name, Fx_display_list):
Likewise.  Use x_display_list where appropriate.
* w32term.h (w32_display_name_list): Remove declaration.
* w32term.c (w32_display_name_list): Remove.
(w32_initialize_display_info, x_delete_display, syms_of_w32term):
Adjust users.
* w32fns.c (x_display_info_for_name, Fx_display_list):
Likewise.  Use x_display_list where appropriate.
* nsterm.h (ns_display_name_list): Remove declaration.
* nsterm.m (ns_display_name_list): Remove.
(ns_term_init, syms_of_nsterm): Adjust users.
* nsfns.m (ns_display_info_for_name, Fx_display_list):
Likewise.  Use x_display_list where appropriate.
* termhooks.h (TERMINAL_FONT_CACHE): New macro.
* alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
(mark_terminals): Mark per-terminal font cache.

10 years ago* net/tramp-smb.el (tramp-smb-maybe-open-connection): Fix an error
Michael Albinus [Fri, 18 Oct 2013 10:22:02 +0000 (12:22 +0200)]
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Fix an error
introduced on 2013-09-08, which results in an infinite loop
requesting a password.

10 years agoRemove erroneously-committed merge comment.
Reuben Thomas [Fri, 18 Oct 2013 08:48:33 +0000 (09:48 +0100)]
Remove erroneously-committed merge comment.

10 years ago* lisp/progmodes/verilog-mode.el (verilog-case-fold): Add :version.
Glenn Morris [Fri, 18 Oct 2013 07:56:45 +0000 (00:56 -0700)]
* lisp/progmodes/verilog-mode.el (verilog-case-fold): Add :version.

10 years agoSync with upstream verilog-mode revision 1a6ecec7
Wilson Snyder [Fri, 18 Oct 2013 07:46:36 +0000 (00:46 -0700)]
Sync with upstream verilog-mode revision 1a6ecec7

* progmodes/verilog-mode.el (verilog-mode-version): Update.
(verilog-mode-release-date): Remove.
(verilog-highlight-grouping-keywords, verilog-active-low-regexp)
(verilog-auto-inst-param-value, verilog-auto-input-ignore-regexp)
(verilog-auto-inout-ignore-regexp, verilog-auto-output-ignore-regexp)
(verilog-auto-tieoff-ignore-regexp)
(verilog-auto-unused-ignore-regexp, verilog-typedef-regexp)
(verilog-scan-cache-preserving, verilog-mode, verilog-at-struct-p)
(verilog-signals-with, verilog-dir-cache-preserving)
(verilog-auto-inst, verilog-auto-inout-param, verilog-auto): Doc fixes.
(verilog-case-fold): New option, to control case folding in
regexp searches, bug597.
(verilog-menu): Add verilog-sk-uvm-component, minor tweaks.
(verilog-string-match-fold, verilog-in-paren-count)
(verilog-in-struct-nested-p, verilog-at-struct-mv-p)
(verilog-at-close-struct-p): New functions.
(verilog-beg-block-re-ordered, verilog-extended-case-re)
(verilog-forward-sexp, verilog-set-auto-endcomments):
(verilog-leap-to-case-head): Handle "unique0" case.
(verilog-in-constraint-re): New constant.
(verilog-keywords, verilog-type-font-keywords):
Add some SystemVerilog 1800-2012 keywords.
(verilog-label-be): Remove unimplemented argument, bug669.
(verilog-batch-execute-func): When batch expanding clear create-lockfiles
to prevent spurious user locks when a file ends up not changing.
(verilog-calculate-indent, verilog-calc-1)
(verilog-at-close-constraint-p, verilog-at-constraint-p)
(verilog-do-indent): Fix indentation of nested constraints and structures.
(verilog-sig-tieoff, verilog-typedef-name-p, verilog-auto-inst)
(verilog-auto-inst-param): Use verilog-string-match-fold.
(verilog-read-inst-module-matcher): Fix AUTOINST on gate primitives with #1.
(verilog-read-decls): Fix double-declaring user-defined typed signals.
Reads all user-defined typed variables.
(verilog-read-defines): Fix reading definitions inside comments, bug647.
(verilog-signals-matching-regexp)
(verilog-signals-not-matching-regexp, verilog-auto):
Respect verilog-case-fold.
(verilog-diff-report): Fix line count.
(verilog-auto-assign-modport): Remove unused local `modi'.
(verilog-auto-inst-port): Support [][] in AUTO_TEMPLATE to
better handle multidimensional arrays.
Fix packed array ports misadding bit index in AUTOINST, bug637.
(verilog-auto-output, verilog-auto-input): Fix AUTOINPUT and AUTOOUTPUT
to not double-declare existing outputs and inputs, respectively.
(verilog-template-map): Bind U to verilog-sk-uvm-component.
(verilog-sk-uvm-object): Rename from verilog-sk-uvm-class.
(verilog-sk-uvm-component): New skeleton.
(verilog-submit-bug-report): Add verilog-case-fold,
remove verilog-mode-release-date.

10 years agoStandardize license notice
Glenn Morris [Fri, 18 Oct 2013 07:03:48 +0000 (00:03 -0700)]
Standardize license notice

10 years agoDon't run timers in input-pending-p. Its new check-timers param
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.

Fixes: debbugs:15045

10 years ago* lisp/textmodes/remember.el (remember): set buffer-offer-save in
Reuben Thomas [Fri, 18 Oct 2013 02:26:28 +0000 (03:26 +0100)]
* lisp/textmodes/remember.el (remember): set buffer-offer-save in
remember buffers.

10 years agoIELM improvements.
Daniel Colascione [Fri, 18 Oct 2013 00:55:15 +0000 (16:55 -0800)]
IELM improvements.

10 years agoCode cleanup.
Michael Albinus [Thu, 17 Oct 2013 19:39:22 +0000 (21:39 +0200)]
Code cleanup.

* net/tramp.el (tramp-debug-message): Do not check for connection
buffer.
(tramp-message): Use "vector" connection property.

* net/tramp.el (tramp-rfn-eshadow-update-overlay)
(tramp-equal-remote, tramp-eshell-directory-change)
* net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file)
* net/tramp-cmds.el (tramp-list-remote-buffers)
(tramp-cleanup-connection, tramp-cleanup-this-connection)
* net/tramp-compat.el (tramp-compat-process-running-p)
* net/tramp-ftp.el (tramp-ftp-file-name-handler)
* net/tramp-gvfs.el (tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-rename-file)
* net/tramp-sh.el (tramp-sh-handle-set-file-times)
(tramp-set-file-uid-gid)
* net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file): Use `tramp-tramp-file-p' instead
of `file-remote-p'.

* net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p)
* net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
(tramp-gw-aux-proc-sentinel, tramp-gw-process-filter)
(tramp-gw-open-network-stream): Suppress unrelated traces.

* net/tramp-adb.el (tramp-adb-maybe-open-connection)
* net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Set "vector"
connection property.

* 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.

10 years ago* lisp/indent.el (indent-rigidly): Fix 2013-10-08 change.
Glenn Morris [Thu, 17 Oct 2013 19:31:11 +0000 (15:31 -0400)]
* lisp/indent.el (indent-rigidly): Fix 2013-10-08 change.

Fixes: debbugs:15635

10 years agoContinuation of previous change.
Xue Fuqiao [Thu, 17 Oct 2013 13:56:37 +0000 (21:56 +0800)]
Continuation of previous change.

10 years ago* doc/lispref/display.texi (Width): Fix arguments of ‘truncate-string-to-width’.
Xue Fuqiao [Thu, 17 Oct 2013 13:46:44 +0000 (21:46 +0800)]
* doc/lispref/display.texi (Width): Fix arguments of ‘truncate-string-to-width’.

10 years agoTrivial doc fix.
Xue Fuqiao [Thu, 17 Oct 2013 11:43:40 +0000 (19:43 +0800)]
Trivial doc fix.

10 years agoMake some functions static in non-Microsoft builds.
Paul Eggert [Thu, 17 Oct 2013 06:42:21 +0000 (23:42 -0700)]
Make some functions static in non-Microsoft builds.

On my platform (Fedora 19 x86-64), this shrinks the
Emacs executable (text+data) by 0.25%.
* dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
(load_color) [!MSDOS]:
* gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
* keyboard.h (make_ctrl_char) [!WINDOWSNT]:
* lisp.h (check_existing):
* process.h (conv_sockaddr_to_lisp, network_interface_list)
(network_interface_info) [!WINDOWSNT]:
* termhooks.h (encode_terminal_code) [!WINDOWSNT]:
Remove extern decls.
* fileio.c (check_existing):
* keyboard.c (make_ctrl_char) [!WINDOWSNT]:
* process.c (conv_sockaddr_to_lisp, network_interface_list)
(network_interface_info) [!WINDOWSNT]:
* term.c (encode_terminal_code) [!WINDOWSNT]:
* xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
* xfaces.c (load_color) [!MSDOS]:
Now static.
* fileio.c (check_existing, check_executable, check_writable):
* process.c (network_interface_list, network_interface_info):
Move earlier, so that we don't need forward decls.
* gnutls.c (fn_gnutls_transport_set_errno)
(emacs_gnutls_transport_set_errno) [!WINDOWNT]:
Remove; unused.
* w32.c (init_environment): Use faccessat rather than
check_existing, partly for consistency with the rest of the code
in this file, partly so that check_existing can be static.

10 years ago* lisp/skeleton.el (skeleton-newline): Remove.
Stefan Monnier [Thu, 17 Oct 2013 04:51:05 +0000 (00:51 -0400)]
* lisp/skeleton.el (skeleton-newline): Remove.
(skeleton-internal-1): Use (insert "\n") instead.

10 years ago* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Complete var names for
Stefan Monnier [Thu, 17 Oct 2013 04:49:42 +0000 (00:49 -0400)]
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Complete var names for
let-bindings.

10 years ago* lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's
Stefan Monnier [Thu, 17 Oct 2013 03:56:51 +0000 (23:56 -0400)]
* lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's
forward-sexp-function while we redo its job.

Fixes: debbugs:15613

10 years ago* calc/calc-comb.el (math-prime-test): Don't assume large integers are
Jay Belanger [Thu, 17 Oct 2013 03:37:05 +0000 (22:37 -0500)]
* calc/calc-comb.el (math-prime-test): Don't assume large integers are
  represented by lists.

* doc/misc/calc.el (Data Type Formats): Don't specify the size at
  which integers begin to be represented by lists.

10 years agoMake VALMASK visible to GDB even if clang is used.
Paul Eggert [Thu, 17 Oct 2013 03:08:59 +0000 (20:08 -0700)]
Make VALMASK visible to GDB even if clang is used.

* emacs.c (MAIN_PROGRAM): New macro.
* lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.

Fixes: debbugs:15574

10 years agobool vector int width fixes
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.

10 years ago* lisp/tmm.el (tmm--history): New dynamic variable.
Glenn Morris [Wed, 16 Oct 2013 18:23:15 +0000 (14:23 -0400)]
* lisp/tmm.el (tmm--history): New dynamic variable.
(tmm-prompt): Use tmm--history in place of `history'.

Fixes: debbugs:15623

10 years ago* process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
Paul Eggert [Wed, 16 Oct 2013 17:36:04 +0000 (10:36 -0700)]
* process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.

(struct sockaddr): Add forward decl, for platforms that lack it.

10 years ago* nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
Jan Djärv [Wed, 16 Oct 2013 16:55:45 +0000 (18:55 +0200)]
* nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
Qnil.

Fixes: debbugs:15628

10 years agoImplement network-interface-* functions for MS-Windows (bug #15610).
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.

10 years agoFix bug #15629 with GUI menus on NS.
Eli Zaretskii [Wed, 16 Oct 2013 15:07:36 +0000 (18:07 +0300)]
Fix bug #15629 with GUI menus on NS.

 src/menu.c (have_boxes): Fix redundant simulation of radio buttons
 in NS GUI sessions.

10 years agoAdd an index for explicit selective display.
Xue Fuqiao [Wed, 16 Oct 2013 13:46:01 +0000 (21:46 +0800)]
Add an index for explicit selective display.

* doc/lispref/display.texi (Selective Display): Add an index for
explicit selective display.

10 years ago* net/tramp-smb.el (tramp-smb-acl-program): New customer option.
Michael Albinus [Wed, 16 Oct 2013 13:16:53 +0000 (15:16 +0200)]
* net/tramp-smb.el (tramp-smb-acl-program): New customer option.
(tramp-smb-errors): Add error messages.
(tramp-smb-actions-with-acl): New defconst.
(tramp-smb-file-name-handler-alist) [set-file-acl]: Add handler.
(tramp-smb-action-with-acl, tramp-smb-handle-set-file-acl): New defuns.
(tramp-smb-handle-file-acl): Rewrite, using "smbcacls".
(tramp-smb-handle-file-attributes): Simplify test for "stat" capability.
(tramp-smb-get-stat-capability): Fix tests.

10 years ago* fns.c (Fstring_as_unibyte): Fix last change.
Dmitry Antipov [Wed, 16 Oct 2013 09:56:36 +0000 (13:56 +0400)]
* fns.c (Fstring_as_unibyte): Fix last change.

10 years ago* fns.c (Fstring_as_unibyte): Use xlispstrdup.
Dmitry Antipov [Wed, 16 Oct 2013 09:30:30 +0000 (13:30 +0400)]
* fns.c (Fstring_as_unibyte): Use xlispstrdup.

10 years ago* lisp/progmodes/subword.el (subword-capitalize): Fix Stefan's mess.
Dima Kogan [Wed, 16 Oct 2013 03:02:40 +0000 (23:02 -0400)]
* lisp/progmodes/subword.el (subword-capitalize): Fix Stefan's mess.

Fixes: debbugs:15580

10 years ago* ansi-color.el (ansi-color-drop-regexp): Add 1J, 1K, 2K.
Glenn Morris [Wed, 16 Oct 2013 01:38:12 +0000 (18:38 -0700)]
* ansi-color.el (ansi-color-drop-regexp): Add 1J, 1K, 2K.

Fixes: debbugs:15617

10 years ago* files.el (hack-local-variables): Warn about misplaced lexical-binding.
Glenn Morris [Wed, 16 Oct 2013 01:33:16 +0000 (18:33 -0700)]
* files.el (hack-local-variables): Warn about misplaced lexical-binding.
(hack-local-variables--warned-lexical): New.

Fixes: debbugs:15616

10 years ago* net/eww.el (eww-render): Always set eww-current-url, and update header line.
Glenn Morris [Wed, 16 Oct 2013 01:30:55 +0000 (18:30 -0700)]
* net/eww.el (eww-render): Always set eww-current-url, and update header line.
(eww-display-html): ... Rather than just doing it here.

Fixes: debbugs:15622

10 years ago* etc/NEWS: improve wording.
Dmitry Gutov [Wed, 16 Oct 2013 00:21:06 +0000 (04:21 +0400)]
* etc/NEWS: improve wording.

10 years ago* etc/NEWS: Mention the homepage-related changes in package.el.
Dmitry Gutov [Wed, 16 Oct 2013 00:17:38 +0000 (04:17 +0400)]
* etc/NEWS: Mention the homepage-related changes in package.el.

10 years ago* print.c (print_object): Print " ..." when truncating bool vectors.
Paul Eggert [Tue, 15 Oct 2013 21:03:00 +0000 (14:03 -0700)]
* print.c (print_object): Print " ..." when truncating bool vectors.

10 years agoSupport mouse wheel in TTY menus.
Eli Zaretskii [Tue, 15 Oct 2013 18:40:22 +0000 (21:40 +0300)]
Support mouse wheel in TTY menus.

 lisp/menu-bar.el (tty-menu-navigation-map): Bind mouse wheels to TTY
 menu navigations commands.

10 years agoSupport mouse wheel on MS-Windows text-mode console.
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.

10 years agoDisallow bool vector operations on mixed-length operands.
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.

10 years ago* keyboard.c, keyboard.h (all_kboards): Now static.
Paul Eggert [Tue, 15 Oct 2013 13:57:37 +0000 (06:57 -0700)]
* keyboard.c, keyboard.h (all_kboards): Now static.

10 years agoAdd usage note of buffer-invisibility-spec.
Xue Fuqiao [Tue, 15 Oct 2013 12:47:57 +0000 (20:47 +0800)]
Add usage note of buffer-invisibility-spec.

* src/buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
note from the lispref.

10 years ago* doc/lispref/display.texi (Warning Basics): Mention the ‘*Warnings*’ buffer.
Xue Fuqiao [Tue, 15 Oct 2013 08:43:56 +0000 (16:43 +0800)]
* doc/lispref/display.texi (Warning Basics): Mention the ‘*Warnings*’ buffer.

10 years agoSpace after comma in ChangeLogs.
Paul Eggert [Tue, 15 Oct 2013 06:36:43 +0000 (23:36 -0700)]
Space after comma in ChangeLogs.

10 years ago* nsterm.h (struct ns_display_info): Remove set-but-unused
Dmitry Antipov [Tue, 15 Oct 2013 02:45:03 +0000 (06:45 +0400)]
* nsterm.h (struct ns_display_info): Remove set-but-unused
member image_cache (image caches are per-terminal anyway).
(FRAME_X_IMAGE_CACHE): Remove.
* nsterm.m (ns_initialize_display_info): Adjust user.

10 years ago* indent/ruby.rb: Fix an example, remove wrong example, and add two more.
Dmitry Gutov [Tue, 15 Oct 2013 01:21:22 +0000 (04:21 +0300)]
* indent/ruby.rb: Fix an example, remove wrong example, and add two more.

10 years ago* doc/misc/cl.texi (Argument Lists): Add indexes for &key and &aux.
Xue Fuqiao [Mon, 14 Oct 2013 22:25:14 +0000 (06:25 +0800)]
* doc/misc/cl.texi (Argument Lists): Add indexes for &key and &aux.

10 years agoComment
Xue Fuqiao [Mon, 14 Oct 2013 22:20:52 +0000 (06:20 +0800)]
Comment

10 years ago* lisp/progmodes/subword.el (subword-capitalize): Be careful when
Dima Kogan [Mon, 14 Oct 2013 19:20:29 +0000 (15:20 -0400)]
* lisp/progmodes/subword.el (subword-capitalize): Be careful when
the search for [[:alpha:]] fails.

Fixes: debbugs:15580

10 years agoAttempt to fix time_t related problems with MinGW 4.0 runtime.
Eli Zaretskii [Mon, 14 Oct 2013 16:23:10 +0000 (19:23 +0300)]
Attempt to fix time_t related problems with MinGW 4.0 runtime.

 nt/inc/mingw_time.h: New file.
 nt/inc/ms-w32.h: Include mingw_time.h instead of doing its job.

 src/w32proc.c: Include mingw_time.h.
 src/w32.c: Include mingw_time.h.

10 years agoImplement scrolling of TTY menus when the screen is too short.
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.

10 years ago* termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
Dmitry Antipov [Mon, 14 Oct 2013 12:19:21 +0000 (16:19 +0400)]
* termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
(FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
(FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
Adjust to match the change described below.
(struct terminal): Move must_write_spaces, line_ins_del_ok,
char_ins_del_ok, scroll_region_ok, scroll_region_cost and
memory_below_frame members to...
* termchar.h (struct tty_display_info): ...here because they're
relevant only on TTYs.  Prefer unsigned bitfield where appropriate.
* term.c (init_tty):
* nsterm.m (ns_create_terminal):
* w32term.c (w32_create_terminal):
* xterm.c (x_create_terminal): Adjust users.
* dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
to filter out non-TTY frames.  Adjust comment.
(scrolling): Adjust user.  Prefer eassert for debugging check.

10 years ago* xfaces.c (PT_PER_INCH): Remove unused macro.
Dmitry Antipov [Mon, 14 Oct 2013 10:55:24 +0000 (14:55 +0400)]
* xfaces.c (PT_PER_INCH): Remove unused macro.
* termhooks.h (struct terminal): Remove set-but-unused
member fast_clear_end_of_line.
(FRAME_FAST_CLEAR_END_OF_LINE): Remove.
* nsterm.m (ns_create_terminal):
* term.c (init_tty):
* w32term.c (w32_create_terminal):
* xterm.c (x_create_terminal): Adjust users.

10 years agoAuto-commit of generated files.
Glenn Morris [Mon, 14 Oct 2013 10:17:44 +0000 (06:17 -0400)]
Auto-commit of generated files.

10 years ago* lisp.h (bool_vector_size): New function.
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.

10 years ago* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
Dmitry Gutov [Mon, 14 Oct 2013 01:51:20 +0000 (04:51 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
methods ending with `?' and `!'.

* test/indent/ruby.rb: More examples for bug#15594, both failing and
now passing.

10 years ago* progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from
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.

10 years ago* lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent):
Glenn Morris [Sun, 13 Oct 2013 23:21:56 +0000 (16:21 -0700)]
* lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent):
Occur buffers are read-only.  http://bugs.debian.org/720775

10 years ago* configure.ac [alpha]: Explicit error in non-ELF case.
Glenn Morris [Sun, 13 Oct 2013 23:01:20 +0000 (16:01 -0700)]
* configure.ac [alpha]: Explicit error in non-ELF case.

* doc/emacs/ack.texi (Acknowledgments): Comment out old alpha stuff.

* lisp/emacs-lisp/authors.el (authors-fixed-entries):
Comment out old alpha stuff.

Fixes: debbugs:15601

10 years ago* lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding'
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.

10 years agoFix indentation/fontification of Java enum with "implements"/generic.
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.

10 years agoNEWS tweak.
Xue Fuqiao [Sun, 13 Oct 2013 12:14:28 +0000 (20:14 +0800)]
NEWS tweak.