Add support for bracketed paste mode; add infrastructure for
managing terminal mode enabling and disabling automatically.
* xt-mouse.el:
(xterm-mouse-mode): Simplify.
(xterm-mouse-tracking-enable-sequence)
(xterm-mouse-tracking-disable-sequence): New constants.
(turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Use
tty-mode-set-strings and tty-mode-reset-strings terminal
parameters instead of random hooks.
(turn-on-xterm-mouse-tracking)
(turn-off-xterm-mouse-tracking): Delete.
* term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment.
(xterm-paste-ending-sequence): New constant.
(xterm-paste): New command used for bracketed paste support.
(xterm-modify-other-keys-terminal-list): Delete obsolete variable.
(terminal-init-xterm-bracketed-paste-mode): New function.
(terminal-init-xterm): Call it.
(terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings
and tty-mode-reset-strings instead of random hooks.
(xterm-turn-on-modify-other-keys)
(xterm-turn-off-modify-other-keys)
(xterm-remove-modify-other-keys): Delete obsolete functions.
* term/screen.el: Rewrite to just use the xterm code. Add
copyright notice. Mention tmux.
Paul Eggert [Thu, 17 Apr 2014 06:40:25 +0000 (23:40 -0700)]
* GNUmakefile: Speed up 'make bootstrap' in fresh checkout.
(ORDINARY_GOALS): New macro, which excludes 'bootstrap'.
(bootstrap, .PHONY): New rules.
* INSTALL.REPO: Document current procedure better.
Move copyright notice to just before license notice.
Paul Eggert [Thu, 17 Apr 2014 06:02:38 +0000 (23:02 -0700)]
* Makefile.in (force-info): Remove.
All uses removed. This hack is no longer needed here
now that we can assume GNU Make's .PHONY feature works.
(bootstrap): No need to make 'info', since 'all' now implies 'info'.
Ian D [Thu, 17 Apr 2014 03:58:25 +0000 (23:58 -0400)]
* lisp/image-mode.el (image-mode-window-put): Also update the property of
the "default window".
* lisp/doc-view.el (doc-view-new-window-function): If no window
exists, move to the last known page.
Paul Eggert [Thu, 17 Apr 2014 01:35:20 +0000 (18:35 -0700)]
Be consistent about reporting infoclean failures.
* doc/emacs/Makefile.in (infoclean):
* doc/lispintro/Makefile.in (infoclean):
* doc/lispref/Makefile.in (infoclean):
* doc/misc/Makefile.in (infoclean):
Do not fail merely because the info directory does not exist,
but do fail if it exists and can't be cleaned.
Paul Eggert [Wed, 16 Apr 2014 15:16:35 +0000 (08:16 -0700)]
Remove DATA_SEG_BITS.
The DATA_SEG_BITS hack was needed for older 32 bit platforms.
As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
cc, but that platform is so old that SGI itself stopped supporting
it in December 2013. If you still need Emacs on IRIX, please
either compile with GCC and port the undumping code, or run
'./configure --with-wide-int'.
* configure.ac (DATA_SEG_BITS): Remove. All uses removed.
* src/alloc.c (gdb_make_enums_visible): Update to match lisp.h.
* src/lisp.h (GCTYPEBITS): Move definition up, and switch to the
DEFINE_GDB_SYMBOL_START way to define it.
(NONPOINTER_BITS): New macro.
(EMACS_INT): Use it.
[!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
the problem and/or configuring --with-wide-int.
(USE_LSB_TAG): Simplify, based on above changes.
(gdb_DATA_SEG_BITS): Remove. All uses removed.
* src/vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
Stefan Monnier [Wed, 16 Apr 2014 14:00:39 +0000 (10:00 -0400)]
* src/window.c (save_window_save): Lookup window_point_insertion_type in
the right buffer.
(Qwindow_point_insertion_type): New var.
(syms_of_window): Initialize it.
Eli Zaretskii [Wed, 16 Apr 2014 13:27:28 +0000 (16:27 +0300)]
Fix the MSDOS build.
src/unexcoff.c [MSDOS]: Include libc/atexit.h.
(copy_text_and_data): Zero out the atexit chain pointer before
dumping Emacs.
src/termhooks.h (encode_terminal_code): Update prototype.
src/term.c (encode_terminal_code) [DOS_NT]: Make it externally
visible for all DOS_NT ports, not just WINDOWSNT.
(syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
unless it is defined.
(emacs_pipe) [MSDOS]: Redirect to 'pipe'.
src/process.c (close_on_exec, accept4, process_socket): Move into
the "ifdef subprocesses" part.
(catch_child_signal): Condition by "ifdef subprocesses".
(syms_of_process) <Qinternal_default_process_sentinel>
<Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
src/msdos.h: Add prototypes for new functions.
(EINPROGRESS): Define.
(O_CLOEXEC): Define to zero.
src/msdos.c (check_window_system): Remove unnecessary an
incompatible duplicate function.
(sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New
functions in support of new functionality.
src/menu.c (single_menu_item): Add visual indication of submenu
also for menus on MSDOS frames.
(Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
when async subprocesses aren't supported.
src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
src/emacs.c (close_output_streams): Zero out errno before calling
close_stream.
src/dired.c [MSDOS]: Include msdos.h.
src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
(DATA_START) [MSDOS]: Define.
(SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
Ifdef away for MSDOS.
(record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
(call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
for MSDOS.
(call_process) [MSDOS]: Fix call sequence of dostounix_filename.
Use temporary file template that is compatible with mkostemp.
Move vfork-related portions under #ifndef MSDOS.
(syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide
doc strings, as required by snarf-documentation.
msdos/sedlisp.inp:
msdos/sedlibmk.inp:
msdos/sedleim.inp:
msdos/sed3v2.inp:
msdos/sed2v2.inp:
msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4.
msdos/inttypes.h: Add PRIdMAX.
msdos/INSTALL: Update for Emacs 24.4.
msdos/sedadmin.inp: New file.
Karl Fogel [Wed, 16 Apr 2014 06:46:36 +0000 (14:46 +0800)]
* savehist.el (savehist-save): Remove workaround for a read-passwd
bug that was fixed before 24.3. Thanks to Juanma Barranquero for
noticing that the shim was still present.
Paul Eggert [Tue, 15 Apr 2014 15:43:41 +0000 (08:43 -0700)]
Fix some xgselect-vs-pselect bugs.
This may not fix Bug#17172, but it fixes some bugs discovering
while auditing xgselect.c for that bug.
when one of glib's file descriptors is greater than FDS_LIM.
Treat rfds, wfds, efds consistently, and test G_IO_PRI too.
Clear input masks when pselect returns zero.
Stefan Monnier [Tue, 15 Apr 2014 13:21:18 +0000 (09:21 -0400)]
* src/buffer.c (Foverlays_at): Add argument `sorted'.
* doc/lispref/display.texi (Overlay Properties): Reword the doc of `priority'.
(Finding Overlays): Document new arg of `overlays-at'.
* lisp/obsolete/lucid.el (extent-at):
* lisp/htmlfontify.el (hfy-overlay-props-at): Use the new `sorted' arg of
overlays-at.
(hfy-fontify-buffer): Remove unused var `orig-ovls'.
* lisp/ps-def.el (ps-generate-postscript-with-faces1): Use the new `sorted'
arg of overlays-at. Use `invisible-p'.
Eli Zaretskii [Mon, 14 Apr 2014 15:32:27 +0000 (18:32 +0300)]
Fix bidirectional redisplay when deletion creates a paragraph start.
src/insdel.c (invalidate_buffer_caches): When deleting or replacing
text, invalidate the bidi_paragraph_cache upto and including the
preceding newline.
Paul Eggert [Mon, 14 Apr 2014 05:23:31 +0000 (22:23 -0700)]
Clean up configure-time library handling a bit.
This patch was inspired by emacs-24 2014-04-09T13:37:49Z!sdl.web@gmail.com, which fixed
a bug due to sloppy library handling in 'configure'.
* configure.ac (LIB_MATH, LIB_PTHREAD, LIBXMU):
Use AC_SEARCH_LIBS instead of AC_CHECK_LIB as per Autoconf manual.
(LIB_MATH, LIB_PTHREAD, HAVE_X11, IMAGEMAGICK_LIBS, GTK_LIBS)
(DBUS_LIBS, LIBXMU, XFT_LIBS, LIBXSM, LIBXML2_LIBS, LIBS_MAIL)
(with_kerberos):
Don't let the library choice infect $LIBS.
(dnet_ntoa, cma_open): Remove obsolete tests.
(emacs_pthread_function): Probe for pthread_kill, not pthread_self,
as that's a bit more selective on GNU/Linux.
(LIBXEXT): Remove.
(touchlock): Test for existence when $LIBS_MAIL is in use.
(AC_CHECK_FUNCS): Use only $LIB_MATH in addition to $LIBS
when testing for typical functions like accept4, lrand48.
(random, rint): Remove obsolete HP-UX 9 A.09.05 test.
Paul Eggert [Sun, 13 Apr 2014 22:51:08 +0000 (15:51 -0700)]
Port to IRIX 6.5.
This port requires IRIX cc, as I did not have time to get
undump working with the old GCC on the system I had access to,
but that's better than nothing.
* configure.ac (gl_GCC_VERSION_IFELSE): Remove unused macro
that wouldn't have worked anyway, with IRIX cc.
(emacs_cv_clang, emacs_cv_sanitize_address)
(ns_osx_have_104, ns_osx_have_105):
Don't assume '#error' makes the compiler fail,
as this doesn't work with IRIX cc.
(CFLAGS, LIBS): Don't let the GnuTLS results infect later 'configure'
checks. This runs afoul of an IRIX configuration where GnuTLS is
in an optional library that also contains getdelim, and causes
a later 'configure' to incorrectly think getdelim is supported.
* src/alloc.c (TAGGABLE_NULL): New constant,
for porting to hosts with nontrivial DATA_SEG_BITS settings.
(next_vector, set_next_vector): Use it.
* src/conf_post.h (INET6) [IRIX6_5]: Define.
(HAVE_GETADDRINFO) [IRIX6_5]: Undef.
* src/data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
* src/lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
for consistency with how TAGGABLE_NULL is computed.
Michael Albinus [Sun, 13 Apr 2014 10:31:48 +0000 (12:31 +0200)]
* net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
patch, there are new problems with file names containing spaces.
Get rid of backticks. (Bug#17238)
Eli Zaretskii [Sun, 13 Apr 2014 07:49:23 +0000 (10:49 +0300)]
Improve documentation of blink-cursor-mode and its customization variables.
lisp/frame.el (blink-cursor-blinks, blink-cursor-blinks-done): Doc fixes.
(blink-cursor-mode): Mention customization variables and the
effect of 'blink-cursor-blinks'.
doc/emacs/display.texi (Cursor Display): Explain better how to customize
'blink-cursor-blinks'.
Barry O'Reilly [Sat, 12 Apr 2014 19:20:44 +0000 (15:20 -0400)]
* simple.el (undo): Prevent insertion of identity mapping into
undo-equiv-table so as undo-only does not inf loop in the presence
of consecutive nils in undo list.
lisp/faces.el (make-face): Remove deprecated optional argument. The
conditional application of X resources is handled directly by
make-face-x-resource-internal since Emacs 24.4.
(make-empty-face): Don't pass optional argument to make-face.
lisp/faces.el (make-face): Deprecate optional argument as it is no
longer needed/used since the conditional X resources handling
has been pushed down to make-face-x-resource-internal itself.
(make-empty-face): Don't pass optional argument to make-face.
Eli Zaretskii [Sat, 12 Apr 2014 11:21:47 +0000 (14:21 +0300)]
Fix bug #17244 with line-move-visual when display string covers a lot of text.
src/xdisp.c (move_it_by_lines): If a large portion of buffer text is
covered by a display string that ends in a newline, and that cases
going back by DVPOS lines to hit the search limit, lift the limit
and go back until DVPOS is reached.
src/indent.c (Fvertical_motion): Handle correctly the case when the
display string is preceded by an empty line.
Leo Liu [Sat, 12 Apr 2014 04:07:53 +0000 (12:07 +0800)]
Don't break emacs <= 24.3 just yet
* progmodes/octave.el (completion-table-with-cache): Define if not
available.
(octave-goto-function-definition)
(octave-sync-function-file-names)
(octave-find-definition-default-filename): Backquote upattern for
compatibility.
Stefan Monnier [Fri, 11 Apr 2014 01:05:03 +0000 (21:05 -0400)]
* lisp/newcomment.el (comment-indent-new-line): Sink code where it's used.
Reuse the previous comment's indentation unconditionally if it's on its
own line.
Paul Eggert [Thu, 10 Apr 2014 19:12:34 +0000 (12:12 -0700)]
Spelling fixes.
* automated/electric-tests.el: Fix spelling error in test name.
(whitespace-skipping-for-quotes-not-outside):
Rename from whitespace-skipping-for-quotes-not-ouside.
Leo Liu [Wed, 9 Apr 2014 13:37:49 +0000 (21:37 +0800)]
New command rcirc-cmd-reconnect
* net/rcirc.el (rcirc-connection-info): New variable.
(rcirc-connect): Use it to store connection info.
(rcirc-buffer-process): Avoid get-buffer-process which returns nil
for killed process.
(rcirc-cmd-reconnect): New command.
(rcirc-mode, set-rcirc-encode-coding-system)
(set-rcirc-decode-coding-system, rcirc-connect): Use setq-local.
Stefan Monnier [Wed, 9 Apr 2014 01:48:07 +0000 (21:48 -0400)]
* src/insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
region handling (and don't call signal_before_change) if
inhibit_modification_hooks is set.
(signal_before_change): Don't check inhibit_modification_hooks any more.
* lisp/subr.el (with-silent-modifications): Don't bind deactivate-mark,
buffer-file-name, and buffer-file-truename any more.
Stefan Monnier [Mon, 7 Apr 2014 16:08:46 +0000 (12:08 -0400)]
* src/alloc.c: Keep track of symbols referenced from pure space (bug#17168).
(symbol_block_pinned): New var.
(Fmake_symbol): Initialize `pinned'.
(purecopy): New function, extracted from Fpurecopy. Mark symbols as
pinned and signal an error for un-purifiable objects.
(pure_cons): Use it.
(Fpurecopy): Use it, except for objects that can't be purified.
(mark_pinned_symbols): New function.
(Fgarbage_collect): Use it.
(gc_sweep): Remove hack made unnecessary.
* src/lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
João Távora [Mon, 7 Apr 2014 07:29:50 +0000 (08:29 +0100)]
Improve on previous quote autopairing change
Backported from trunk 2014-04-04T23:31:02Z!joaotavora@gmail.com
* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'
* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
João Távora [Mon, 7 Apr 2014 07:24:03 +0000 (08:24 +0100)]
Inhibit quote autopairing more frequently
Backported from trunk 2014-04-02T09:59:06Z!joaotavora@gmail.com
* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.
* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
João Távora [Sun, 6 Apr 2014 23:37:17 +0000 (00:37 +0100)]
Fix electric-pair-delete-adjacent-pairs in modes binding backspace.
* lisp/elec-pair.el (electric-pair-backward-delete-char): Delete.
(electric-pair-backward-delete-char-untabify): Delete.
(electric-pair-mode-map): Bind backspace to a menu item filtering
a new `electric-pair-delete-pair' command.
(electric-pair-delete-pair): New command.
João Távora [Sun, 6 Apr 2014 23:09:19 +0000 (00:09 +0100)]
Fix electric-pair-skip-whitespace with quotes in text-mode
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Don't
skip whitespace for quote syntax when `electric-pair-text-pairs'
and `electric-pair-pairs' were used.
* test/automated/electric-tests.el (electric-pair-define-test-form):
More readable test docstrings.
(whitespace-skipping-for-quotes-not-ouside)
(whitespace-skipping-for-quotes-only-inside)
(whitespace-skipping-not-without-proper-syntax):