Paul Eggert [Mon, 11 Nov 2013 16:37:54 +0000 (08:37 -0800)]
* search.c (find_newline): Rewrite to prefer offsets to pointers.
This avoids undefined behavior when subtracting pointers into
different aways. On my platform it also makes the code a tad
smaller and presumably faster.
Michael Albinus [Mon, 11 Nov 2013 15:18:07 +0000 (16:18 +0100)]
* net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer)
(tramp-sh-handle-file-local-copy): Don't write a message when
saving temporary files.
* net/tramp-smb.el (tramp-smb-handle-copy-directory): Fix bug when
both directories are remote.
(tramp-smb-handle-directory-files): Do not return double entries.
Do not expand full file names.
(tramp-smb-handle-insert-directory): Accept nil SWITCHES.
(tramp-smb-handle-write-region): Implement APPEND.
(tramp-smb-get-stat-capability): Fix a stupid bug.
Stefan Monnier [Mon, 11 Nov 2013 05:18:53 +0000 (00:18 -0500)]
* lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
* src/keyboard.c (command_loop_1): Use region-extract-function.
* src/insdel.c (Qregion_extract_function): Not static any more (can we
stop pretending that these vars can benefit from being marked static?).
Glenn Morris [Mon, 11 Nov 2013 00:58:13 +0000 (16:58 -0800)]
Update from Unicode 6.2.0 to 6.3.0
Note: I used Emacs 24.3 to generate the uni-*.el files, owing to
unexplained (possibly harmless) differences that the current trunk's
use of lexical-binding for subr.el causes. Ref:
http://debbugs.gnu.org/15825#29
* admin/unidata/BidiMirroring.txt, admin/unidata/UnicodeData.txt:
Update to 6.3.0.
Dmitry Gutov [Sat, 9 Nov 2013 01:12:25 +0000 (03:12 +0200)]
* lisp/textmodes/ispell.el (ispell-lookup-words): When `look' is not
available and the word has no wildcards, append one to the grep
pattern.
http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00258.html
(ispell-complete-word): Call `ispell-lookup-words' with the value
independent of `ispell-look-p'.
Dmitry Gutov [Fri, 8 Nov 2013 23:59:56 +0000 (01:59 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p):
Not after "||".
(ruby-smie-rules): Indent non-hanging "begin" blocks as part of
their parent.
* src/xfaces.c (lface_fully_specified_p): Let distant-foreground be
unspecified.
(realize_default_face): Remove assignment to distant-foreground if
unspecified.
Paul Eggert [Fri, 8 Nov 2013 16:24:40 +0000 (08:24 -0800)]
Merge from gnulib.
This incorporates:
2013-11-08 extern-inline: port better to OS X 10.9
2013-11-08 fpending: fix regression on DragonFly BSD
* lib/fpending.h, m4/extern-inline.m4, m4/fpending.m4:
Update from gnulib.
Bozhidar Batsov [Fri, 8 Nov 2013 16:01:55 +0000 (18:01 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding): Use
`ruby-encoding-magic-comment-style' to control the
style of the auto-inserted encoding comment.
Eli Zaretskii [Fri, 8 Nov 2013 10:21:35 +0000 (12:21 +0200)]
Switch cache-long-scans to t by default.
src/xdisp.c (message_dolog): Make sure the *Messages* buffer has its
cache-long-scans disabled, since we don't want to call
prepare_to_modify_buffer (in insert_1_both) for each message we
display.
src/buffer.h (bset_cache_long_scans): New INLINE function, moved
from buffer.c. Improve commentary to the buffer field setter
functions.
src/buffer.c (bset_cache_long_scans): Static function deleted.
Improve commentary to the buffer field setter functions.
(init_buffer_once): Default for cache-long-scans changed to t.
(Bug#15797)
Michael Albinus [Fri, 8 Nov 2013 09:31:15 +0000 (10:31 +0100)]
* automated/file-notify-tests.el:
* automated/tramp-tests.el: Add `tramp-own-remote-path' to
`tramp-remote-path' when running on hydra.
(tramp-test07-file-exists-p): Remove instrumentation code.
(tramp-test26-process-file): Don't use "/bin/true" and
"/bin/false", these paths do not exist on hydra.
Paul Eggert [Fri, 8 Nov 2013 07:28:21 +0000 (23:28 -0800)]
* chartab.c (make_sub_char_table): Fix size typo.
This bug was introduced in my 2013-06-21 change, and caused
struct Lisp_Sub_Char_Table objects to be given too many slots,
which broke 'make -C admin/unidata'.
Darren Hoo [Fri, 8 Nov 2013 04:09:56 +0000 (23:09 -0500)]
* lisp/man.el (Man-start-calling): New macro, extracted from
Man-getpage-in-background.
(Man-getpage-in-background): Use it.
(Man-update-manpage): New command.
(Man-mode-map): Bind it.
Dmitry Gutov [Fri, 8 Nov 2013 02:31:51 +0000 (04:31 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Improve precedences
of "and", "or", "&&" and "||".
(ruby-smie--args-separator-p): Prohibit keyword "do" as the first
argument. Prohibit opening curly brace because it could only be a
block opener in that position.
(ruby-smie--forward-token, ruby-smie--backward-token): Separate
"|" from "&" or "*" going after it. That can happen in block
arguments.
(ruby-smie--indent-to-stmt): New function, seeks the end of
previous statement or beginning of buffer.
(ruby-smie-rules): Use it.
(ruby-smie-rules): Check if there's a ":" before a curly block
opener candidate; if there is, it's a hash.
Paul Eggert [Thu, 7 Nov 2013 05:31:04 +0000 (21:31 -0800)]
Port to C11 aligned_alloc, and fix some integer overflows.
* configure.ac (GMALLOC_OBJ): Initialize to empty if !system_malloc
and doug_lea_malloc.
(aligned_alloc): Test for existence if !GMALLOC_OBJ and not darwin.
(posix_memalign): Test for existence only if !GMALLOC_OBJ and
not darwin and !aligned_alloc.
* src/alloc.c (USE_ALIGNED_ALLOC): New symbol.
(USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
and use of posix_memalign replaced with aligned_alloc.
(aligned_alloc): New function, defined or declared as needed.
* src/conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
Don't undef; configure.ac now does this.
* src/gmalloc.c (aligned_alloc) [MSDOS]: New decl.
(calloc, aligned_alloc): Check for integer overflow.
(aligned_alloc): Rename from memalign. All uses changed.
(memalign): New function, an alias for aligned_alloc.
Dmitry Gutov [Thu, 7 Nov 2013 03:02:01 +0000 (05:02 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p):
No implicit semi after "^", "and" or "or".
(ruby-smie-grammar): New tokens: "and" and "or".
(ruby-smie--args-separator-p): Fix the check for tokens at POS.
Exclude "and" and "or". Remove "do" in order to work around token
priorities.
(ruby-smie-rules): Add all infix tokens. Handle the case of
beginning-of-buffer.
Stefan Monnier [Wed, 6 Nov 2013 18:41:31 +0000 (13:41 -0500)]
* src/xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
redisplay--mode-lines-cause.
(redisplay_internal): Keep them uptodate. Remove redundant check of
buffer_shared_and_changed.
* *.[chm]: Number every assignment to update_mode_lines so we
can track why it is set.
Glenn Morris [Wed, 6 Nov 2013 08:37:01 +0000 (00:37 -0800)]
Remove some directory-changing in lisp/Makefile
* lisp/Makefile.in (setwins, setwins_almost, setwins_for_subdirs): Simplify.
(setwins_almost, setwins_for_subdirs): Don't assume called from srcdir.
(custom-deps, finder-data, autoloads, update-subdirs): No need to cd.
Stefan Monnier [Wed, 6 Nov 2013 02:10:18 +0000 (21:10 -0500)]
* lisp/electric.el (electric-indent-local-mode): New minor mode.
(electric-indent-functions-without-reindent): New var.
(electric-indent-post-self-insert-function): Use it.
* lisp/emacs-lisp/gv.el (buffer-local-value): Add setter.
Paul Eggert [Wed, 6 Nov 2013 00:14:56 +0000 (16:14 -0800)]
Integer-related fixes for term.c etc.
* dispextern.h (face_tty_specified_color): New function.
* term.c (turn_on_face): Don't rely on undefined behavior when
assigning an out-of-range value to 'long'. Simplify
test for toggling highlight.
(tty_capable_p): Omit last two (unused) args. All callers changed.
* term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
(read_menu_input, tty_menu_activate, tty_menu_show):
* xfaces.c (x_supports_face_attributes_p)
(tty_supports_face_attributes_p):
Use bool for boolean. All callers changed.
(tty_supports_face_attributes_p): Omit defaults for color indices;
no longer needed. Simplify tail call.
Stefan Monnier [Tue, 5 Nov 2013 16:29:58 +0000 (11:29 -0500)]
* src/eval.c (handlerlist_sentinel): New variable.
(init_eval): Use it to ensure handlerlist is non-NULL.
(unwind_to_catch): Make sure we never set handlerlist to NULL.
(Fsignal): Adjust NULLness test of handlerlist.
* src/lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
Eli Zaretskii [Tue, 5 Nov 2013 16:26:11 +0000 (18:26 +0200)]
Fix bug #15148 with garbled display in Dired when cache-long-scans is ON.
src/callproc.c (call_process): Call prepare_to_modify_buffer before
decoding text read from the sub-process, as the decoded stuff will
be inserted into the buffer. This will invalidate the various
caches maintained for the buffer.
Bozhidar Batsov [Tue, 5 Nov 2013 09:47:47 +0000 (11:47 +0200)]
* lisp/progmodes/python.el (python-mode): Remove incorrect text from docstring.
* lisp/progmodes/scheme.el (scheme-mode): Remove incorrect text from docstring.
* lisp/progmodes/prolog.el (prolog-mode): Remove incorrect text from docstring.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode, lisp-interaction-mode, emacs-lisp-mode):
Remove incorrect text from docstring.