Paul Eggert [Sat, 13 Dec 2014 01:51:03 +0000 (17:51 -0800)]
Replace union hack with C11-style max_align_t
* admin/merge-gnulib (GNULIB_MODULES): Add stddef, for max_align_t.
* lib/gnulib.mk: Regenerate.
* src/alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
a hack involving a union.
Ted Zlatanov [Sat, 13 Dec 2014 00:15:10 +0000 (19:15 -0500)]
Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens. 16d4c1c A better fix for bug#19346 82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files. 3cf7629 Git ignore lib/std*.h 301a401 Always define `gnutls-available-p' even if GnuTLS is not available. d76b9b2 Don't break example string between 2 lines (bug#19257) 75b4857 Port commit-msg to mawk 9ac0332 Improve commit-msg messages and autosquash 0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300) 935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'. c2db939 python.el: Support interpreter paths with spaces d83f329 ChangeLog fix 0f9fbb9 Port commit-message checking to FreeBSD 9. 3db1ada admin/MAINTAINERS: Update my interests and responsibilities. 6382f24 * .gitignore: Ignore autosave files.
Paul Eggert [Fri, 12 Dec 2014 07:16:37 +0000 (23:16 -0800)]
Merge from gnulib
2014-12-12 stddef: support C11's max_align_t
2014-12-08 apply _GL_ATTRIBUTE_PURE to some inline functions
2014-12-02 support GNU format printf and scanf on mingw
* doc/misc/texinfo.tex, lib/stat-time.h, lib/stddef.in.h:
* lib/timespec.h, m4/extensions.m4, m4/stddef_h.m4, m4/stdio_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
Stefan Monnier [Fri, 12 Dec 2014 14:55:42 +0000 (09:55 -0500)]
* lisp/progmodes/python.el (python-indent-line): Use `noindent' in strings.
(python-indent-levels): Document extra value.
(python-indent-calculate-indentation): Return `noindent' in strings.
(python-indent-post-self-insert-function)
(python-indent-calculate-levels): Handle new value.
Eric S. Raymond [Fri, 12 Dec 2014 03:44:32 +0000 (22:44 -0500)]
Remove VC rollback method.
* vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el,
vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: rrollback
method removed, to be replaced in the future by uncommit.
Stefan Monnier [Thu, 11 Dec 2014 21:07:23 +0000 (16:07 -0500)]
Fixes: debbugs:19161
* src/fileio.c: Better preserve window-points during revert.
(Qget_buffer_window_list): New var.
(get_window_points_and_markers, restore_window_points): New functions.
(Finsert_file_contents): Use them to save and restore window-points.
Dmitry Antipov [Thu, 11 Dec 2014 13:26:00 +0000 (16:26 +0300)]
Never pass an invalid X connection descriptor to an input reading loop
Fixes: debbugs:19147
* xterm.c (x_delete_terminal): Call emacs_close for X connection
descriptor if called from x_connection_closed and always delete
this descriptor from keyboard waiting set (Bug#19147).
Michael Albinus [Thu, 11 Dec 2014 12:01:45 +0000 (13:01 +0100)]
* automated/vc-tests.el (vc-test--revision-granularity-function):
New defun.
(vc-test--create-repo-function): Rename from
`vc-test--create-repo-if-not-supported'. Adapt all callees.
(vc-test--create-repo): Check also for revision-granularity.
(vc-test--unregister-function): Additional argument FILE. Adapt
all callees.
(vc-test--working-revision): New defun.
(vc-test-*-working-revision): New tests.
Eli Zaretskii [Wed, 10 Dec 2014 17:39:37 +0000 (19:39 +0200)]
Fix out-of-memory condition in display of long bracketed lines (bug#19322)
src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
(bidi_cache_max_elts): New global variable.
(bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
(bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
its initial value.
(bidi_cache_search): Handle overflown cache. Improve commentary.
(bidi_cache_ensure_space): Limit allocations to the current value
of bidi_cache_max_elts. Force xpalloc not to over-allocate. If
less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
the increment to not exceed the limit.
(bidi_cache_iterator_state): Now returns non-zero if succeeded to
cache, zero otherwise (meaning the cache overflowed). In the
latter case, set bidi_cache_last_idx to -1.
(bidi_peek_at_next_level): Handle overflown cache.
(bidi_push_it): Increase the cache limit for iterating the new
object.
(bidi_pop_it): Decrease the cache limit back to previous value.
(bidi_shelve_cache): Shelve the current value of the cache limit.
(bidi_unshelve_cache): Restore the value of cache limit.
(bidi_find_bracket_pairs): If the cache overflows while looking
for the paired bracket, give up and let bidi_resolve_neutrals
process the bracket as a simple neutral.
(bidi_find_other_level_edge): If the cache overflows, fall back on
Plan B, which effectively stops the reordering and restarts it on
the next character (after resetting the cache).
(bidi_move_to_visually_next): When the cache overflows, reset it
after processing the last cached character.
(ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp.
Fixes: debbugs:19192
* net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing
trouble with ls over ftp. These flags result in ls returning no
output, causing Tramp-breakage.
Paul Eggert [Wed, 10 Dec 2014 07:47:16 +0000 (23:47 -0800)]
Fix glitches in gnutls.c, mostly memory-related
* gnutls.c: Sort macro definitions by name.
(fn_gnutls_transport_set_errno): Omit unreachable definition.
(fn_gnutls_x509_crt_get_signature): Omit unused symbol.
(gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
Prefer ptrdiff_t for sizes. Check for arithmetic overflow when
calculating string length. Use make_uninit_string, to avoid
copying the string. Cast the char, not the pointer.
(gnutls_certificate_details): Use xmalloc and xfree, not malloc
and free. Work even for dates past the year 9999. Use void *
for buffers, to avoid casts.
Bozhidar Batsov [Tue, 9 Dec 2014 17:43:24 +0000 (19:43 +0200)]
Add a command for string quotes toggling to ruby-mode
* progmodes/ruby-mode.el (ruby-toggle-string-quotes): New command that
allows you to quickly toggle between single-quoted and double-quoted
string literals.
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Update.
(verilog-auto-end-comment-lines-re, verilog-end-block-ordered-re)
(verilog-set-auto-endcomments): Automatically comment property/
endproperty blocks to match other similar blocks like sequence/
endsequence, function/endfunction, etc. Reported by Alex Reed.
(verilog-set-auto-endcomments): Fix end comments for functions of
type void, etc. Detect the function- or task-name when
auto-commenting blocks that lack an explicit portlist.
Reported by Alex Reed.
(verilog-nameable-item-re): Fix nameable items that can have an
end-identifier to include endchecker, endgroup, endprogram,
endproperty, and endsequence. Reported by Alex Reed.
(verilog-preprocessor-re, verilog-beg-of-statement):
Fix indentation of property/endproperty around pre-processor
directives. Reported by Alex Reed.
(verilog-label-be): When auto-commenting a buffer, consider
auto-comments on all known keywords (not just a subset thereof).
Reported by Alex Reed.
(verilog-beg-of-statement): Fix labeling do-while blocks, bug842.
Reported by Alex Reed.
(verilog-beg-of-statement-1, verilog-at-constraint-p):
Fix hanging with many curly-bracket pairs, bug663.
(verilog-do-indent): Fix electric tab deleting form-feeds.
Note caused by indent-line-to deleting tabls pre 24.5.
(verilog-auto-output, verilog-auto-input, verilog-auto-inout)
(verilog-auto-inout-module, verilog-auto-inout-in): Doc fixes.
(verilog-read-always-signals, verilog-auto-sense-sigs)
(verilog-auto-reset): Fix AUTORESET with always_comb and always_latch,
bug844. Reported by Greg Hilton.
Author: Alex Reed <acreed4@gmail.com> (tiny change)
* lisp/progmodes/verilog-mode.el (verilog-no-indent-begin-re):
Fix `verilog-indent-begin-after-if' nil not honoring 'forever',
'foreach', and 'do' keywords.
(verilog-endcomment-reason-re, verilog-beg-of-statement):
Fix labeling do-while blocks, bug842.
(verilog-backward-token): Fix indenting sensitivity lists with named
events, bug840.
Reto Zimmermann [Tue, 9 Dec 2014 06:34:12 +0000 (22:34 -0800)]
Sync with upstream vhdl mode v3.36.1
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-compiler-alist): Anchor all error regexps.
(vhdl-compile-use-local-error-regexp): Change default to nil.
(vhdl-asort, vhdl-anot-head-p): Remove.
(vhdl-aput, vhdl-adelete, vhdl-aget): Simplify.
Remove optional argument of vhdl-aget and update all callers.
(vhdl-import-project): Also set `vhdl-compiler'.
* lisp/net/eww.el (eww-update-header-line-format): Mark valid/invalid
certificates in the header line.
(eww-invalid-certificate, eww-valid-certificate): New faces.
* lisp/net/eww.el (eww-buffers-mode): New major mode.
(eww-list-buffers, eww-buffer-select, eww-buffer-show-next)
(eww-buffer-show-previous, eww-buffer-kill, eww-buffer-show): New
commands/functions.
Make gnutls-negotiate ignore specially handled files
Fixes: debbugs:15866
* lisp/net/gnutls.el (gnutls-negotiate): Ignore files found via
'file-name-handler-alist' since the gnutls library can't use those.
* net/newst-treeview.el (newsticker--treeview-list-add-item)
(newsticker--treeview-propertize-tag): Bind tree menu to mouse-3.
(newsticker--treeview-create-groups-menu)
(newsticker--treeview-create-tree-menu): Removed.
(newsticker--treeview-tree-open-menu): New.
(newsticker-treeview-tree-click): Pass event to
`newsticker-treeview-tree-do-click'.
(newsticker-treeview-tree-do-click): Open treemenu on mouse-3.
Juri Linkov [Fri, 5 Dec 2014 23:55:20 +0000 (01:55 +0200)]
Better support for milti-line shell input.
* lisp/comint.el (comint-history-isearch-search)
(comint-history-isearch-wrap): Use field-beginning instead of
comint-line-beginning-position.
(comint-send-input): Go to the end of the field instead of the end
of the line to accept whole multi-line input.
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
Juri Linkov [Fri, 5 Dec 2014 23:42:11 +0000 (01:42 +0200)]
Better check for displaying completions near the minibuffer.
* lisp/minibuffer.el (minibuffer-completion-help): Compare
selected-window with minibuffer-window to check whether
completions should be displayed near the minibuffer.
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00311.html
Stefan Monnier [Fri, 5 Dec 2014 17:13:09 +0000 (12:13 -0500)]
* lisp/emacs-lisp/eieio-core.el: Prefer inlinable functions over macros.
(class-p, generic-p, eieio-object-p, class-abstract-p):
Make them defsubst, so as to avoid corner case problems where
the arg might be evaluated in the condition-case, or it can't be passed
to higher-order functions like `cl-some'.