Michael Albinus [Sun, 15 Jun 2014 15:56:58 +0000 (17:56 +0200)]
Sync with Tramp 2.2.10.
* test/automated/tramp-tests.el (tramp--test-enabled): Ignore errors.
(tramp--instrument-test-case): Extend docstring.
(tramp-test15-copy-directory): Skip for tramp-smb.el.
(tramp-test21-file-links): Use `file-truename' for directories.
(tramp-test27-start-file-process, tramp-test28-shell-command):
Retrieve process output more robustly.
(tramp--test-check-files): Extend test.
(tramp-test30-special-characters): Skip for tramp-adb.el,
tramp-gvfs.el and tramp-smb.el. Add further file names.
Michael Albinus [Sun, 15 Jun 2014 15:47:35 +0000 (17:47 +0200)]
Sync with Tramp 2.2.10.
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Improve messages.
(tramp-adb-maybe-open-connection): Don't set
`tramp-current-*' variables.
* lisp/net/tramp-cache.el (tramp-flush-file-function): Do not flush
file properties of temporary buffers.
* lisp/net/tramp-ftp.el (top): Remove special handling for URL syntax.
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
(tramp-gvfs-handle-delete-file): Flush file
properties, not directory properties.
(tramp-gvfs-handle-file-attributes): Use `string-to-number' when
reading "unix::mode".
(tramp-gvfs-handle-file-name-all-completions):
Use "-h" option for "gvfs-ls".
(tramp-gvfs-url-file-name): `user' and `localname' could be nil.
(tramp-gvfs-send-command): Simplify traces.
* lisp/net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
(vc-git-program, vc-hg-program): Declare.
(tramp-methods) <sftp>: Remove. It has never worked satisfactorily.
(tramp-methods) <nc>: Add new method.
(tramp-methods) <telnet>: Redirect stderr to "/dev/null".
(tramp-methods) <plink, plinkx, pscp, psftp>: Improve
`tramp-login-args'.
(tramp-default-user-alist): Add "nc".
(top): Remove completion function for "sftp". Add completion
functions for "nc" and "psftp".
(tramp-do-copy-or-rename-file-out-of-band): Tweak docstring.
Implement support for "nc" method.
(tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
(tramp-remote-coding-commands, tramp-call-local-coding-command):
Tweak docstring.
(tramp-sh-handle-write-region): Tweak error message.
(tramp-sh-handle-vc-registered): Remove backends when the remote
binary does not exist.
(tramp-find-inline-encoding): Do not raise an error.
(tramp-make-copy-program-file-name): Tweak docstring. Handle also
the "nc" case. Quote result also locally.
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-set-file-acl): Use `start-process'.
(tramp-smb-handle-insert-directory): Use progress reporter.
(tramp-smb-handle-rename-file): Flush also file properties of
FILENAME.
* lisp/net/tramp.el (tramp-methods): Tweak docstring.
(tramp-handle-file-accessible-directory-p): Check for
`file-readable-p' instead of `file-executable-p'.
(tramp-check-cached-permissions): Use
`tramp-compat-file-attributes'.
(tramp-call-process): Add new argument VEC. Adapt callees in all
tramp*.el files.
Eli Barzilay [Sun, 15 Jun 2014 04:52:34 +0000 (00:52 -0400)]
* lisp/calculator.el: Lots of revisions
- Kill the calculator buffer after electric mode too.
- Make decimal mode have "," groups, so it's more fitting for use in
money calculations.
- Factorial works with non-integer inputs.
- Swallow less errors.
- Lots of other improvements, but no changes to custom variables, or
other user visible changes (except the above).
Stefan Monnier [Sun, 15 Jun 2014 04:10:40 +0000 (00:10 -0400)]
* lisp/ses.el: Miscellaneous cleanups; use lexical-binding; avoid add-to-list.
(ses-localvars): Remove ses--local-printer-list, unused.
(ses--metaprogramming): New macro. Use it to defvar variables.
(ses-set-localvars): Simplify.
(ses--locprn, ses-cell): Use defstruct. Change ses-cell's
property-list into an alist.
(ses-locprn-get-compiled, ses-locprn-compiled-aset)
(ses-locprn-get-def, ses-locprn-def-aset, ses-locprn-get-number):
Remove; use defstruct accessors/setters instead.
(ses-cell-formula-aset, ses-cell-printer-aset)
(ses-cell-references-aset): Remove, use setf instead.
(ses--alist-get): New function.
(ses-cell-property): Rename from ses-cell-property-get and rewrite.
Use an alist instead of a plist and don't do move-to-front since the
list is always short.
(ses-cell-property-get-fun, ses-cell-property-delq-fun)
(ses-cell-property-set-fun, ses-cell-property-set)
(ses-cell-property-pop-fun, ses-cell-property-get-handle)
(ses-cell-property-handle-car, ses-cell-property-handle-setcar): Remove.
(ses--letref): New macro.
(ses-cell-property-pop): Rewrite.
(ses--cell): Rename from ses-cell and make it into a function.
Make `formula' fallback on `value' if nil.
(ses--local-printer): Rename from ses-local-printer and make it into
a function.
(ses-set-cell): Turn it into a macro so finding the accessor from the
field name is done at compile time.
(ses-repair-cell-reference-all): Test presence of `sym' rather than
`ref' before adding `sym' to :ses-repair-reference.
(ses-calculate-cell): Use ses--letref rather than
ses-cell-property-get-handle.
(ses-write-cells): Use a single prin1-to-string.
(ses-setter-with-undo): New function.
(ses-aset-with-undo, ses-set-with-undo): Rewrite using it.
(ses-unset-with-undo): Remove.
(ses-load): Prefer apply' over `eval'.
(ses-read-printer, ses-set-column-width): Use standard "(default
foo)" format.
Glenn Morris [Sun, 15 Jun 2014 00:17:21 +0000 (17:17 -0700)]
Parallelize clean rules using GNU make features
* Makefile.in: (submake_template): New definition.
(mostlyclean_dirs, clean_dirs, distclean_dirs, maintainer_clean_dirs):
New variables.
(mostlyclean, clean, distclean, bootstrap-clean, maintainer-clean)
(extraclean): Define using each subdirectory as a prequisite.
Glenn Morris [Sat, 14 Jun 2014 23:54:39 +0000 (16:54 -0700)]
Stop cc-mode loading cl at runtime
* lisp/progmodes/cc-langs.el: Require cl-lib.
Replace delete-duplicates and mapcan by cl- versions throughout.
And cl-macroexpand-all by macroexpand-all.
(delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
Paul Eggert [Sat, 14 Jun 2014 20:24:08 +0000 (13:24 -0700)]
Port part of the AIX fix to Solaris.
* configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD.
This ports part of the recent AIX fix to Solaris. It is needed
for the same reason that _THREAD_SAFE is needed on AIX, e.g., to
make sure that each thread has its own 'errno'.
Eli Zaretskii [Sat, 14 Jun 2014 11:09:10 +0000 (14:09 +0300)]
Fix bug #17777 with keyboard macros and visual-order cursor movement.
src/xdisp.c (Fmove_point_visually): Don't use the glyph matrix
information if we are in the middle of executing a keyboard macro,
since redisplay doesn't update the screen until the macro is
finished.
Paul Eggert [Fri, 13 Jun 2014 15:55:48 +0000 (08:55 -0700)]
Avoid hangs in accept-process-output.
* lisp.h, process.c (wait_reading_process_input):
Return int, not bool. All uses changed.
* process.c (SELECT_CANT_DO_WRITE_MASK):
Remove macro, replacing with ...
(SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
All uses changed.
(status_notify): New arg WAIT_PROC. Return int, not void.
All uses changed.
Eli Zaretskii [Fri, 13 Jun 2014 14:42:43 +0000 (17:42 +0300)]
Don't try to display menus and dialogs in an 'initial' frame.
src/menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
the frame is the initial frame, because the hook is not set up
then, and Emacs crashes.
Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
Nicolas Richard [Thu, 12 Jun 2014 15:54:37 +0000 (17:54 +0200)]
(describe-key) Mention the keymap in which the binding was found.
* lisp/help.el (help--key-binding-keymap): New function.
(help--binding-locus): New function.
(describe-key): Mention the keymap in which the binding was
found.
Stefan Monnier [Thu, 12 Jun 2014 14:35:09 +0000 (10:35 -0400)]
* lisp/hippie-exp.el (he--all-buffers): New function.
(try-expand-line-all-buffers, try-expand-list-all-buffers)
(try-expand-dabbrev-all-buffers): Use it.
Emilio C. Lopes [Thu, 12 Jun 2014 13:45:52 +0000 (09:45 -0400)]
* lisp/hippie-exp.el (try-expand-line-all-buffers)
(try-expand-list-all-buffers, try-expand-dabbrev-all-buffers):
Read hippie-expand-only-buffers and hippie-expand-ignore-buffers in the
original buffer, in case they're buffer-local.
Glenn Morris [Thu, 12 Jun 2014 01:00:57 +0000 (21:00 -0400)]
Simplify doc/misc/Makefile.in with GNU Make features
* doc/misc/Makefile.in (mkinfodir): Remove.
(${buildinfodir}): Generate using an order-only prerequisite.
(.dvi.ps): Replace with pattern rule.
($INFO_TARGETS): Mark as PHONY.
(${buildinfodir}): New rule.
(EXTRA_OPTS, need_emacsver, need_emacsver_prefix): New variables.
(${buildinfodir}/%.info, %.dvi, %.pdf, %.html, %.ps):
New pattern rules, replacing numerous previous explicit rules.
(info_template): New definition.
(gnus.dvi, gnus.pdf): Use distinct intermediate files.
(mostlyclean): Adjust for above gnus change.
Stefan Monnier [Wed, 11 Jun 2014 21:51:44 +0000 (17:51 -0400)]
* lisp/rect.el: Make it possible to move bounds past EOL or into TABs.
(operate-on-rectangle): Use apply-on-rectangle.
(rectangle--mark-crutches): New var.
(rectangle--pos-cols, rectangle--col-pos, rectangle--point-col)
(rectangle--crutches, rectangle--reset-crutches): New functions.
(apply-on-rectangle): Obey crutches. Avoid setq.
Fix missing final iteration if end is at EOB&BOL.
(rectangle-mark-mode-map): Add remap bindings for
exchange-point-and-mark and char/line movements.
(rectangle--*-char): New function.
(rectangle-exchange-point-and-mark, rectangle-right-char)
(rectangle-left-char, rectangle-forward-char)
(rectangle-backward-char, rectangle-next-line)
(rectangle-previous-line): New commands.
(rectangle--place-cursor): New function.
(rectangle--highlight-for-redisplay): Use it. Use apply-on-rectangle.
Paul Eggert [Wed, 11 Jun 2014 20:03:46 +0000 (13:03 -0700)]
Backport fcntl.h AIX fix from the trunk.
This fixes a bug with the shell freezing. See:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17598#185
Merge from gnulib, incorporating:
2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
* lib/fcntl.in.h, m4/dup2.m4, m4/fcntl.m4:
Update from gnulib.
Paul Eggert [Wed, 11 Jun 2014 17:51:27 +0000 (10:51 -0700)]
Use a shell function in configure.ac to cut down on code duplication.
* configure.ac (emacs_check_gnu_make): New shell function.
Use it to avoid duplication when checking for GNU Make.
It's OK for 'configure' to use shell functions these days,
as long as we follow the advice in the 'Shell Functions'
section of the Autoconf manual.
Eli Zaretskii [Wed, 11 Jun 2014 16:11:32 +0000 (19:11 +0300)]
Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.
src/xdisp.c (set_cursor_from_row): Fix an off-by-one error when
matching overlay strings with 'cursor' property against buffer
positions traversed in the glyph row.
Paul Eggert [Tue, 10 Jun 2014 19:43:13 +0000 (12:43 -0700)]
Rely on AC_CANONICAL_HOST to detect whether we're using mingw.
See the thread containing:
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00206.html
* configure.ac (AC_CANONICAL_HOST): Invoke this as early as we
can, which is just after AM_INIT_AUTOMAKE. Then check for mingw
just after that.
Dmitry Antipov [Tue, 10 Jun 2014 03:13:41 +0000 (07:13 +0400)]
* dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
* xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
function. Also adjust comment.
* fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
Glenn Morris [Tue, 10 Jun 2014 02:20:31 +0000 (22:20 -0400)]
Add .info extension to @setfilename commands in doc/
This makes no difference to anything, since we always use makeinfo -o,
but it makes automake happier, if we ever decide to use that.
Paul Eggert [Mon, 9 Jun 2014 20:31:06 +0000 (13:31 -0700)]
Say (accept-process-output P)'s result pertains to P if P is non-nil.
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output)
(wait_reading_process_output): Mention that if PROCESS is non-nil,
the return value is about PROCESS, not about other processes.
Dmitry Antipov [Mon, 9 Jun 2014 15:03:49 +0000 (19:03 +0400)]
Further adjustments to mark_object and friends.
Now the mark_object's stack is just 32 bytes on a 64-bit
system, which means extra 20% off the stack usage.
* alloc.c (mark_save_value): As before, refactored out from ...
(mark_object): ... adjusted user. Also add comment.
Karl Berry [Sun, 8 Jun 2014 19:30:13 +0000 (22:30 +0300)]
Simplify info.info for the stand-alone reader
doc/misc/info.texi (Help-^L): "mode line", "screenful",
stand-alone and Emacs Info both use the mode line.
Use x instead of weird C-x 0 to get rid of help msg
in standalone Info.
Dmitry Antipov [Sun, 8 Jun 2014 15:06:03 +0000 (19:06 +0400)]
Change object marking routines to minimize stack usage.
This change moves a few cold paths from mark_object to NO_INLINE
functions and adjusts symbol marking loop. According to GCC 4.8.2
-Wstack-usage, this reduces mark_object's stack usage from 80 to
48 bytes on a 64-bit system. For a long byte-force-recompile runs,
stack usage at the mark phase is reduced up to 28%. Surprisingly,
it also gains up to 3% in speed (with default '-O2 -g3' flags).
* alloc.c (mark_compiled, mark_localized_symbol): New functions,
refactored out from ...
(mark_object): ... adjusted user. Also mark symbols in a tight
inner loop.
(mark_face_cache): Add NO_INLINE.
Glenn Morris [Sun, 8 Jun 2014 07:00:20 +0000 (00:00 -0700)]
info.texi tweaks re S-SPC
* doc/misc/info.texi (Help-Small-Screen): Clarify details of S-SPC.
(Help-Small-Screen, Help-]): Do not mention S-SPC.
(Emacs Info Variables): Markup fix.
Eli Zaretskii [Sat, 7 Jun 2014 07:25:49 +0000 (10:25 +0300)]
Fix last commit.
src/term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
only for WINDOWSNT.
src/menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
Paul Eggert [Sat, 7 Jun 2014 06:10:39 +0000 (23:10 -0700)]
Port better to AIX.
* configure.ac (with_xpm_set): New shell var.
(_THREAD_SAFE): Define on AIX if HAVE_PTHREAD.
(with_xpm): Default to 'no' on AIX.
(LIBXPM): Append -lXpm if -lXaw is also used, as the latter
requires the former on AIX.
Juri Linkov [Fri, 6 Jun 2014 23:38:40 +0000 (02:38 +0300)]
* lisp/desktop.el: Activate auto-saving on window configuration changes.
(desktop-save-mode, desktop-auto-save-timeout): Add/remove
`desktop-auto-save-set-timer' to/from `window-configuration-change-hook'.
(desktop-auto-save-set-timer): Change REPEAT arg of
`run-with-idle-timer' from t to nil.
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00147.html
* lisp/vc/vc-hg.el (vc-hg-log-graph): New var.
(vc-hg-print-log): Use it.
(vc-hg-root-log-format): Include branch name and bookmarks; ignore
graph output.
Stefan Monnier [Fri, 6 Jun 2014 02:35:17 +0000 (22:35 -0400)]
* lisp/mouse.el (mouse-posn-property): Ignore buffer position info when the
even happened elsewhere.
* src/keyboard.c (make_lispy_position): Don't include a buffer position in
mode/header-line mouse events.