]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years ago; Spelling fixes
Paul Eggert [Thu, 22 Dec 2016 18:13:46 +0000 (10:13 -0800)]
; Spelling fixes

7 years agoPacify --enable-gcc-warnings
Paul Eggert [Thu, 22 Dec 2016 17:25:58 +0000 (09:25 -0800)]
Pacify --enable-gcc-warnings

* src/charset.c (load_charset_map):
* src/coding.c (decode_coding_object):
* src/frame.c (make_frame):
* src/window.c (Frecenter):
Mark locals with UNINIT to silence false alarms from
-Wmaybe-uninitialized.
* src/lisp.h (SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD):
Check and assume that values are nonnull.  This pacifies
-Wmaybe-uninitialized in Fmake_variable_buffer_local and
Fmake_local_variable.

7 years agoFix last change with thread marking under GC_CHECK_MARKED_OBJECTS
Eli Zaretskii [Thu, 22 Dec 2016 16:13:16 +0000 (18:13 +0200)]
Fix last change with thread marking under GC_CHECK_MARKED_OBJECTS

* src/thread.c (primary_thread_p): New function.
* src/alloc.c (mark_object): Use 'primary_thread_p' to bypass tests
meant for thread objects allocated dynamically.
* src/thread.h (primary_thread_p): Add prototype.

7 years ago; * test/lisp/buff-menu-tests.el: Fix typo in the header.
Tino Calancha [Thu, 22 Dec 2016 04:38:06 +0000 (13:38 +0900)]
; * test/lisp/buff-menu-tests.el: Fix typo in the header.

7 years agoUse completion-at-point in verilog-mode
Noam Postavsky [Sun, 14 Aug 2016 02:13:56 +0000 (22:13 -0400)]
Use completion-at-point in verilog-mode

There were some functions in verilog-mode that implemented in-buffer
completion, but this needlessly duplicates completion-at-point
functionality, and the popup window management had problems
(see Bug #23842).  We need to keep them for backwards compatibility with
older emacs versions, but use completion-at-point if available.

* lisp/progmodes/verilog-mode.el (verilog-toggle-completions): Mark as
obsolete if completion-cycle-threshold is available.
(verilog-mode-map, verilog-menu): Bind completion-at-point and
completion-help-at-point in preference to verilog-complete-word and
verilog-show-completions, respectively.
(verilog-mode): Add verilog-completion-at-point to
completion-at-point-functions.
(verilog-completion-at-point): New function.
(verilog-show-completions, verilog-complete-word): Use it to avoid code
duplication.

7 years agoKeep default CASECHARS/NOT-CASECHARS for ispell built-in dictionaries
Reuben Thomas [Wed, 21 Dec 2016 17:30:44 +0000 (17:30 +0000)]
Keep default CASECHARS/NOT-CASECHARS for ispell built-in dictionaries

* lisp/textmodes/ispell.el (ispell-set-spellchecker-params): Do not
override CASECHARS and NOT-CASECHARS.  The ispell dictionaries
retain their hardwired values, and all other dictionaries are given
sensible defaults.

7 years ago* tex-mode.el (tex-compile-commands): Add luatex and xetex commands
Stefan Monnier [Wed, 21 Dec 2016 20:51:14 +0000 (15:51 -0500)]
* tex-mode.el (tex-compile-commands): Add luatex and xetex commands

7 years agoFix aborts in GC under GC_CHECK_MARKED_OBJECTS
Eli Zaretskii [Wed, 21 Dec 2016 20:16:24 +0000 (22:16 +0200)]
Fix aborts in GC under GC_CHECK_MARKED_OBJECTS

* src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort
for thread objects.  They are marked via the all_threads list, and
therefore don't need to be inserted into the red-black tree, so
mem_find will never find them.  Reported by Daniel Colascione
<dancol@dancol.org> in
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.

7 years ago* src/data.c (Fmake_variable_frame_local): Remove
Stefan Monnier [Wed, 21 Dec 2016 20:07:43 +0000 (15:07 -0500)]
* src/data.c (Fmake_variable_frame_local): Remove

* src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'.

* src/data.c (swap_in_symval_forwarding, set_internal)
(set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
Don't pay attention to ->frame_local any more.
(syms_of_data): Remove Qtrapping_frame_local and don't defsubr
Smake_variable_frame_local.

* etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal
of make-variable-frame-local.

* lisp/help-fns.el (describe-variable): Don't handle the now impossible
frame-local case.

* lisp/subr.el (make-variable-frame-local): Remove obsolescence data.

* src/frame.c (store_frame_param):
* src/eval.c (specbind): Don't pay attention to ->frame_local any more.

* src/widget.c (first_frame_p): Remove, unused.

7 years agoPort dumping better to WSL
Paul Eggert [Wed, 21 Dec 2016 17:52:28 +0000 (09:52 -0800)]
Port dumping better to WSL

Problem reported by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00822.html
* src/sysdep.c (disable_address_randomization):
Detect buggy platforms where 'personality' always returns 0.

7 years agoRemove gateway methods in Tramp
Michael Albinus [Wed, 21 Dec 2016 11:42:22 +0000 (12:42 +0100)]
Remove gateway methods in Tramp

* doc/misc/tramp.texi (Top, Configuration): Remove section
`Gateway methods', insert section `Firewalls' in menu.
(History): Gateways are removed now.
(Gateway methods): Remove section.
(Multi-hops, Traces and Profiles): Don't reference to gateways anymore.
(Firewalls): New section.

* etc/NEWS: Gateway methods in Tramp have been removed.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-file-name-port, tramp-accept-process-output): Simplify.

* lisp/net/tramp-gw.el: Remove.

* lisp/net/tramp-sh.el (tramp-gw-tunnel-method)
(tramp-gw-socks-method): Remove declarations.
(tramp-methods) <scp, scpx, ssh, sshx, telnet, nc, plink, pscp>:
Remove `tramp-gw-args' and `tramp-default-port'.  (Bug#18967)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-compute-multi-hops, tramp-maybe-open-connection):
Remove gateway support.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults):
Remove gateway tests.

7 years ago; Revert "Recognize graphicsmagick in image-dired"
Mark Oteiza [Tue, 20 Dec 2016 16:14:53 +0000 (11:14 -0500)]
; Revert "Recognize graphicsmagick in image-dired"

This reverts commit 5c266405f559823038dfa900aaad66605f0d5287.
There are too many annoying differences between GM and IM to make this
default behavior.

7 years agofiles-test-read-file-in-: Delete temporary dir on exit
Tino Calancha [Tue, 20 Dec 2016 10:22:15 +0000 (19:22 +0900)]
files-test-read-file-in-: Delete temporary dir on exit

* test/lisp/files-tests.el (files-test-read-file-in-~):
Create subdir inside dir.

7 years agoibuffer: New filters and commands
Christopher Genovese [Tue, 20 Dec 2016 08:41:56 +0000 (17:41 +0900)]
ibuffer: New filters and commands

Add several new filters and improve documentation.
See discussion on:
https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00399.html
* lisp/ibuf-ext.el: Add paragraph to file commentary.
(ibuffer-saved-filters, ibuffer-filtering-qualifiers)
(ibuffer-filter-groups): Update doc string.
(ibuffer-unary-operand): Add new function that transparently
handles 'not' formats for compound filters.
(ibuffer-included-in-filter-p): Handle 'not' fully; update doc string.
(ibuffer-included-in-filter-p-1): Handle 'and' compound filters.
(ibuffer-decompose-filter): Handle 'and' as well,
and handle 'not' consistently with other uses.
(ibuffer-and-filter): New defun analogous to 'ibuffer-or-filter'.
(ibuffer--or-and-filter): New defun.
(ibuffer-or-filter, ibuffer-and-filter): Use it.
(ibuffer-format-qualifier): Handle 'and' filters as well.
(ibuffer-filter-by-basename, ibuffer-filter-by-file-extension)
(ibuffer-filter-by-directory, ibuffer-filter-by-starred-name)
(ibuffer-filter-by-modified, ibuffer-filter-by-visiting-file):
Add new pre-defined filters.
(ibuffer-filter-chosen-by-completion): Add new interactive command
for easily choosing a filter from the descriptions.
* lisp/ibuffer.el (ibuffer-mode-map):
Bind ibuffer-filter-by-basename, ibuffer-filter-by-file-extension,
ibuffer-filter-by-starred-name, ibuffer-filter-by-modified,
ibuffer-filter-by-visiting-file to '/b', '/.', '/*', '/i', '/v'
respectively; bind 'ibuffer-or-filter', 'ibuffer-and-filter',
'ibuffer-pop-filter' ,'ibuffer-pop-filter-group' and
'ibuffer-filter-disable' to '/|', '/&', '/<up>', '/S-<up>'
and '/ DEL' respectively.
* test/lisp/ibuffer-tests.el (ibuffer-autoload): Add appropriate
skip specification.
Add menu entries for the new filters.
(ibuffer-filter-inclusion-1, ibuffer-filter-inclusion-2
ibuffer-filter-inclusion-3, ibuffer-filter-inclusion-4
ibuffer-filter-inclusion-5, ibuffer-filter-inclusion-6
ibuffer-filter-inclusion-7, ibuffer-filter-inclusion-8
ibuffer-decompose-filter, ibuffer-and-filter
ibuffer-or-filter): Add new tests; they are skipped unless
ibuf-ext is loaded.
; * etc/NEWS: Add entries for new user-facing features.

7 years agoUpdate NEWS
Mark Oteiza [Tue, 20 Dec 2016 01:37:46 +0000 (20:37 -0500)]
Update NEWS

* etc/NEWS (Image-Dired): New section.

7 years agoRecognize graphicsmagick in image-dired
Mark Oteiza [Tue, 20 Dec 2016 01:35:02 +0000 (20:35 -0500)]
Recognize graphicsmagick in image-dired

* lisp/image-dired.el (image-dired-cmd-create-thumbnail-program):
(image-dired-cmd-create-thumbnail-options):
(image-dired-cmd-create-temp-image-program):
(image-dired-cmd-create-temp-image-options):
(image-dired-cmd-create-standard-thumbnail-options):
(image-dired-cmd-rotate-thumbnail-program):
(image-dired-cmd-rotate-thumbnail-options): Account for existence of
gm(1) executable.

7 years agoImplement asynchronous thumbnail generation in image-dired
Mark Oteiza [Tue, 20 Dec 2016 00:47:06 +0000 (19:47 -0500)]
Implement asynchronous thumbnail generation in image-dired

Additionally, all FOO-options defcustoms that were in fact shell command
strings have been converted to argument lists.  Another method for
shrinking PNG thumbs with optipng(1) has been added.
* lisp/image-dired.el: Remove TODO item in commentary.
(image-dired-cmd-create-thumbnail-options):
(image-dired-cmd-create-temp-image-options):
(image-dired-cmd-rotate-thumbnail-options):
(image-dired-cmd-rotate-original-options):
(image-dired-cmd-write-exif-data-options):
(image-dired-cmd-read-exif-data-options): Convert to argument lists.
(image-dired-cmd-pngnq-program, image-dired-cmd-pngcrush-program):
Change string type to file.
(image-dired-cmd-create-standard-thumbnail-command): Remove.
(image-dired-cmd-pngnq-options):
(image-dired-cmd-create-standard-thumbnail-options):
(image-dired-cmd-optipng-program, image-dired-cmd-optipng-options):
New defcustoms.
(image-dired-queue, image-dired-queue-active-jobs):
(image-dired-queue-active-limit): New variables.
(image-dired-pngnq-thumb, image-dired-pngcrush-thumb):
(image-dired-optipng-thumb): New functions.
(image-dired-create-thumb-1): Renamed from image-dired-create-thumb.
Use start-process instead of call-process.  Set file modes.  Trigger
PNG file optimization in process sentinel.
(image-dired-thumb-queue-run, image-dired-create-thumb): New functions.
(image-dired-display-thumbs):
(image-dired-create-thumbs): Don't expect call-process return value.
(image-dired-display-image, image-dired-rotate-thumbnail): Use
start-process instead of call-process.
(image-dired-rotate-original, image-dired-set-exif-data):
(image-dired-get-exif-data): Adapt to arguments being an arg list.

7 years agoProtect change of window's buffer in vertical-motion against unwinds (bug#25209)
Andreas Schwab [Mon, 19 Dec 2016 22:07:42 +0000 (23:07 +0100)]
Protect change of window's buffer in vertical-motion against unwinds (bug#25209)

* indent.c (restore_window_buffer): New function.
(Fvertical_motion): Use it to restore window's buffer.

7 years agoImprove default load-path for uninstalled CANNOT_DUMP builds
Glenn Morris [Mon, 19 Dec 2016 18:32:55 +0000 (13:32 -0500)]
Improve default load-path for uninstalled CANNOT_DUMP builds

* src/lread.c (load_path_default) [CANNOT_DUMP]:
Use build load-path if we seem to be running uninstalled.  (Bug#24974)
I think this became an issue several years ago when we stopped
using EMACSLOADPATH in the Makefiles; however this change should
improve the CANNOT_DUMP uninstalled case in general.

7 years agoFix crashes upon C-g on Posix TTY frames
Eli Zaretskii [Mon, 19 Dec 2016 17:11:16 +0000 (19:11 +0200)]
Fix crashes upon C-g on Posix TTY frames

* src/thread.h (struct thread_state): New member not_holding_lock.
(maybe_reacquire_global_lock): Add prototype.
* src/thread.c: Include syssignal.h.
(maybe_reacquire_global_lock): New function.
(really_call_select): Set the not_holding_lock member of the
thread state before releasing the lock, and rest it after
re-acquiring the lock when the select function returns.  Block
SIGINT while doing this to make sure we are not interrupted on TTY
frames.
* src/sysdep.c (block_interrupt_signal, restore_signal_mask): New
functions.
* src/syssignal.h (block_interrupt_signal, restore_signal_mask):
Add prototypes.
* src/keyboard.c (read_char) [THREADS_ENABLED]: Call
maybe_reacquire_global_lock.  (Bug#25178)

7 years agoavoid Eager macro-expansion failure: (void-function string-to-list)
Sam Steingold [Mon, 19 Dec 2016 16:44:18 +0000 (11:44 -0500)]
avoid Eager macro-expansion failure: (void-function string-to-list)

* loadup.el [ns]: "ucs-normalize" uses `string-to-list' which is defined
  in "mule-util", so we have to load "mule-util" before "ucs-normalize",
  otherwise I get "Eager macro-expansion failure" on "make bootstrap"

7 years agoFix Bug#24980
Michael Albinus [Mon, 19 Dec 2016 08:32:30 +0000 (09:32 +0100)]
Fix Bug#24980

* lisp/ido.el (ido-add-virtual-buffers-to-list):
Suppress Tramp invocation.  (Bug#24980)

7 years agoAdd a new compile error regexp for Clang includes
Philipp Stephani [Sat, 10 Dec 2016 20:39:55 +0000 (21:39 +0100)]
Add a new compile error regexp for Clang includes

Clang uses a slight variation of GCC's include format, causing includes
to be treated as warnings instead of informational messages.  Use a new
regular expression instead.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): New element
`clang-include' for Clang-style "included from" lines.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add unit test.

7 years agoReinstate ispell character offset (bug#25219)
Alan Third [Sun, 18 Dec 2016 15:54:48 +0000 (15:54 +0000)]
Reinstate ispell character offset (bug#25219)

* lisp/textmodes/ispell.el (ispell-process-line): insert -1 where
ispell-offset used to be.

7 years agoBind new image-mode scroll commands in image-dired
Mark Oteiza [Sun, 18 Dec 2016 14:41:31 +0000 (09:41 -0500)]
Bind new image-mode scroll commands in image-dired

* lisp/image-dired.el (image-dired-display-image-mode-map): Add bindings
to new image-mode commands.

7 years agoFix rx-any with range with ?\] and ?-
Noam Postavsky [Thu, 8 Dec 2016 04:17:37 +0000 (23:17 -0500)]
Fix rx-any with range with ?\] and ?-

* lisp/emacs-lisp/rx.el: Make sure not to produce a circular
list (Bug#25123).
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.

7 years agoUse floor of mtime instead of rounding for thumb property
Mark Oteiza [Sun, 18 Dec 2016 12:28:03 +0000 (07:28 -0500)]
Use floor of mtime instead of rounding for thumb property

This seems to be the correct thing to do, at least more in line with
what at least one other implementation does.  Anything using
gnome-desktop [0] effectively does the same, as
gnome_desktop_thumbnail_is_valid applies atol(3) to mtime for
comparison and time_t on GNU/Linux is a signed int.
[0] https://git.gnome.org/browse/gnome-desktop/
* lisp/image-dired.el (image-dired-create-thumb): Use floor here.

7 years agoFix spelling mistake in private defun name (Bug#25218)
Reuben Thomas [Sat, 17 Dec 2016 19:09:41 +0000 (19:09 +0000)]
Fix spelling mistake in private defun name (Bug#25218)

lisp/textmodes/flyspell.el (flyspell-ajust-cursor-point): Rename to
`flyspell-adjust-cursor-point'.

7 years agoRemove XEmacs support from flyspell.el (Bug#25218)
Reuben Thomas [Sat, 17 Dec 2016 19:06:34 +0000 (19:06 +0000)]
Remove XEmacs support from flyspell.el (Bug#25218)

lisp/textmodes/flyspell.el (flyspell-prog-mode, flyspell-mode-on):
(flyspell-word, flyspell-delete-region-overlays):
(flyspell-correct-word-before-point): Remove XEmacs support.
(flyspell-xemacs-popup): Remove XEmacs-specific defun.

7 years agoMore tests for Tramp
Michael Albinus [Sat, 17 Dec 2016 18:52:38 +0000 (19:52 +0100)]
More tests for Tramp

* lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted
file names.

* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file
name properly.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
Mark quoted file name as absolute.  (Bug#25183)
(tramp--test-windows-nt-and-batch)
(tramp--test-windows-nt-and-pscp-psftp-p): New defuns.
(tramp--test-windows-nt-or-smb-p): Rename from
`tramp--test-smb-windows-nt-p'.  Adapt callees.
(tramp--test-check-files): Improve checks for environment variables.
(tramp-test33-special-characters)
(tramp-test33-special-characters-with-stat)
(tramp-test33-special-characters-with-perl)
(tramp-test33-special-characters-with-ls, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls): Add more checks for skip.

7 years agoFix comments
Eli Zaretskii [Sat, 17 Dec 2016 17:38:36 +0000 (19:38 +0200)]
Fix comments

* src/thread.h (struct thread_state): Fix comments.
* src/process.c (wait_reading_process_output): Fix a typo in
commentary.

7 years agoFix crashes on MS-Windows during dumping
Eli Zaretskii [Sat, 17 Dec 2016 11:08:52 +0000 (13:08 +0200)]
Fix crashes on MS-Windows during dumping

* src/unexw32.c (get_section_info): Make extra_bss_size be the
maximum of extra_bss_size and extra_bss_size_static.  This avoids
computing the size of the output file smaller than it actually
needs to be, which then causes copy_executable_and_dump_data to
write beyond the requested size of the file mapping, thus relying
on the OS roundup to page boundary to save us from ourselves.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html
for the details.

* lib/stdio-impl.h: Revert the workaround fix of not including
errno.h for MinGW.

7 years agoBe more selective clearing the image cache
Mark Oteiza [Fri, 16 Dec 2016 15:14:01 +0000 (10:14 -0500)]
Be more selective clearing the image cache

* lisp/image-dired.el (image-dired-create-thumbs):
(image-dired-rotate-thumbnail, image-dired-refresh-thumb): Only clear
the current thumbnail file from the image cache.

7 years agoUnbreak the MinGW build
Eli Zaretskii [Fri, 16 Dec 2016 10:50:06 +0000 (12:50 +0200)]
Unbreak the MinGW build

* lib/stdio-impl.h [__MINGW32__]: Don't include errno.h.  Without
this, temacs crashes while dumping.

7 years agoMake seq-into return the sequence when no conversion needed
Nicolas Petton [Fri, 16 Dec 2016 10:18:04 +0000 (11:18 +0100)]
Make seq-into return the sequence when no conversion needed

* lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when
  no conversion is needed.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add
  a regression test checking for identity.

7 years agoNew commands image-scroll-left and image-scroll-right
Mark Oteiza [Fri, 16 Dec 2016 02:59:15 +0000 (21:59 -0500)]
New commands image-scroll-left and image-scroll-right

* etc/NEWS: Mention them.
* lisp/image-mode.el (image-scroll-left, image-scroll-right): New
functions.

7 years agoMore image-dired refactoring
Mark Oteiza [Fri, 16 Dec 2016 01:36:24 +0000 (20:36 -0500)]
More image-dired refactoring

* lisp/image-dired.el (image-dired-thumbnail-mode):
(image-dired-display-image-mode): Add :group 'image-dired so
customize-mode works.
(image-dired-display-image): Rearrange.
(image-dired-copy-with-exif-file-name): This map is for side effect.
(image-dired-dired-edit-comment-and-tags): Just use #'identity.

7 years ago* lisp/image-dired.el: Turn on lexical-binding.
Mark Oteiza [Fri, 16 Dec 2016 00:58:33 +0000 (19:58 -0500)]
* lisp/image-dired.el: Turn on lexical-binding.

7 years agoTeach image-dired to also generate large thumbs
Mark Oteiza [Fri, 16 Dec 2016 00:55:47 +0000 (19:55 -0500)]
Teach image-dired to also generate large thumbs

* lisp/image-dired.el (image-dired-thumbnail-storage): Add
standard-large option.
(image-dired-thumb-size): Add condition for standard-large storage.
(image-dired-insert-thumbnail): Check for new option.  Change
thumbnail path conditionally.
(image-dired-thumb-size): New function.
(image-dired-create-thumb, image-dired-line-up-dynamic): Use it.

7 years agoMerge from gnulib
Paul Eggert [Thu, 15 Dec 2016 20:18:28 +0000 (12:18 -0800)]
Merge from gnulib

This incorporates:
2016-12-14 xalloc-oversized: check for PTRDIFF_MAX too
2016-12-12 fpending: port to native Windows with MSVC
* .gitignore: Do not ignore lib/stdio-impl.h.
* lib/fpending.c, lib/xalloc-oversized.h, m4/fpending.m4:
Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stdio-impl.h:
New file, copied from gnulib.
* nt/gnulib.mk (EXTRA_DIST): Add stdio-impl.h.

7 years ago* emacs-document.svg: Append newline.
Paul Eggert [Thu, 15 Dec 2016 20:06:01 +0000 (12:06 -0800)]
* emacs-document.svg: Append newline.

7 years agoDon't abuse princ and spam messages
Mark Oteiza [Thu, 15 Dec 2016 19:40:32 +0000 (14:40 -0500)]
Don't abuse princ and spam messages

* lisp/image-dired.el (image-dired-format-properties-string): Nix princ.
(image-dired-display-thumb-properties):
(image-dired-dired-display-properties): Nix princ.  Bind
message-log-max to nil.

7 years agoInherit things from special-mode and image-mode
Mark Oteiza [Thu, 15 Dec 2016 18:49:38 +0000 (13:49 -0500)]
Inherit things from special-mode and image-mode

* lisp/image-dired.el: Require image-mode library.
(image-dired-thumbnail-mode-map): Remove superfluous binding.
(image-dired-display-image-mode-map): Remove superfluous binding.
Add movement remaps from image-mode-map.
(image-dired-thumbnail-mode): Derive from special-mode.
(image-dired-display-image-mode): Derive from special-mode. Call
image-mode-setup-winprops.

7 years agoFix some image-dired customization types
Mark Oteiza [Thu, 15 Dec 2016 18:25:08 +0000 (13:25 -0500)]
Fix some image-dired customization types

* lisp/image-dired.el (image-dired): Add info link to defgroup.
(image-dired-dir, image-dired-gallery-dir): Set type to directory.
(image-dired-db-file, image-dired-temp-image-file):
(image-dired-cmd-create-thumbnail-program):
(image-dired-cmd-create-temp-image-program):
(image-dired-cmd-rotate-thumbnail-program):
(image-dired-cmd-rotate-original-program):
(image-dired-temp-rotate-image-file):
(image-dired-cmd-write-exif-data-program):
(image-dired-cmd-read-exif-data-program): Set type to file.
(image-dired-create-thumb, image-dired-line-up-dynamic): Check storage
type at runtime, since setting image-dired-thumb-size does not
automatically set image-dired-thumb-width and image-dired-thumb-height.

7 years agoPrevent crashes in xg_select due to concurrency
Eli Zaretskii [Thu, 15 Dec 2016 16:18:59 +0000 (18:18 +0200)]
Prevent crashes in xg_select due to concurrency

* src/xgselect.c (xg_select): Don't call Glib functions that use
'context' if we failed to acquire it.  This means some other
thread owns the context, in which case both using the context and
calling block_input/unblock_input will step on that thread's toes
and eventually lead to crashes.  (Bug#25172)

7 years agoFix circular list handling in seq-mapn
Nicolas Petton [Thu, 15 Dec 2016 09:24:57 +0000 (10:24 +0100)]
Fix circular list handling in seq-mapn

* lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
  Add a regression test.

7 years agoCheck in tramp-tests.el, that environment variables are set correctly
Michael Albinus [Thu, 15 Dec 2016 08:37:35 +0000 (09:37 +0100)]
Check in tramp-tests.el, that environment variables are set correctly

* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Check also, that environment variables are set correctly.

7 years agoProtect environment variables with double quotes in Tramp
Dominique Quatravaux [Thu, 15 Dec 2016 08:37:00 +0000 (09:37 +0100)]
Protect environment variables with double quotes in Tramp

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Protect environment variables with double quotes.

Copyright-paperwork-exempt: yes

7 years ago* lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn.
Tino Calancha [Thu, 15 Dec 2016 06:02:32 +0000 (15:02 +0900)]
* lisp/ibuf-macs.el (define-ibuffer-filter): Wrap ,@body in a progn.

7 years ago* lisp/image-dired.el (image-dired-create-thumb): Create parent directories.
Mark Oteiza [Thu, 15 Dec 2016 01:36:06 +0000 (20:36 -0500)]
* lisp/image-dired.el (image-dired-create-thumb): Create parent directories.

7 years ago* lisp/image-mode.el (image-mode-winprops-alist): Add docstring.
Mark Oteiza [Wed, 14 Dec 2016 21:36:31 +0000 (16:36 -0500)]
* lisp/image-mode.el (image-mode-winprops-alist): Add docstring.

7 years agoRecognize pngnq or pngnq-s9
Mark Oteiza [Wed, 14 Dec 2016 21:34:12 +0000 (16:34 -0500)]
Recognize pngnq or pngnq-s9

* lisp/image-dired.el (image-dired-cmd-pngnq-program): Also consider
pngnq-s9 as a possible executable.

7 years agoUpdate standard image-dired thumbnail location
Mark Oteiza [Wed, 14 Dec 2016 19:34:21 +0000 (14:34 -0500)]
Update standard image-dired thumbnail location

* lisp/image-dired.el (image-dired-thumb-name): Conform to the latest
standard: consider XDG_CACHE_HOME, falling back on ~/.cache.

7 years agoReset window scroll when displaying an image
Mark Oteiza [Wed, 14 Dec 2016 17:25:04 +0000 (12:25 -0500)]
Reset window scroll when displaying an image

When viewing a large image full size and scrolling, for instance, to
the lower right corner, then selecting a much smaller image in the
thumbnail buffer, the window stays scrolled so the new image is out of
the window.  One must scroll back to the "origin" to view the new
displayed image, or just kill the image-dired-display-image buffer and
try again.  This fixes the issue.
* lisp/image-dired.el (image-dired-display-window-width):
(image-dired-display-window-height): Operate on a window as argument.
(image-dired-display-image): Bind (image-dired-display-window) and use
it. Set window vscroll and hscroll to zero when refreshing the
buffer's contents.

7 years agoMore image-dired polish
Mark Oteiza [Wed, 14 Dec 2016 03:56:42 +0000 (22:56 -0500)]
More image-dired polish

* lisp/image-dired.el (image-dired-file-name-at-point): New function.
(image-dired-thumbnail-mode, image-dired-display-image-mode): Disable
undo list. Add image-dired-file-name-at-point to
file-name-at-point-functions to facilitate find-file and friends.
(image-dired-thumbnail-display-external):
(image-dired-dired-display-external): Use start-process instead, to
avoid needlessly blocking and using a shell.

7 years agoReplace ldefs-boot with a much smaller file
Phillip Lord [Thu, 27 Oct 2016 07:07:05 +0000 (08:07 +0100)]
Replace ldefs-boot with a much smaller file

 * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets.
   (bootstrap): Depend on bootstrap-build.
 * admin/ldefs-clean.el: New file.
 * lisp/Makefile.in (compile-first): Depend on loaddefs.el
 * lisp/ldefs-boot.el: Remove.
 * lisp/ldefs-boot-auto.el: New file.
 * lisp/ldefs-boot-manual.el: New file.
 * lisp/loadup.el: Load ldefs-boot-manual.el.
 * src/emacs.c (generating_ldefs_boot): New variable.
   (main): Check whether we are generating ldefs.
 * src/eval.c (autoload-do-load): Dump autoload forms to stderr when
   requested.
 * src/lisp.h (generating_ldefs_boot): New variable.
 * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright,
   lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el,
   lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to
   ldefs-boot.
 * admin/update_autogen: Alter mechanism for ldefs-boot generation.

7 years agoRemove support for aspell < 0.60 (from 2004)
Reuben Thomas [Tue, 13 Dec 2016 00:43:21 +0000 (00:43 +0000)]
Remove support for aspell < 0.60 (from 2004)

lisp/textmodes/ispell.el (ispell-check-version): Require Aspell 0.60.
(ispell-aspell-dictionary-alist): Remove check that we have Aspell 0.60.

7 years agoMinor docstring and comment fixes to ispell.el
Reuben Thomas [Tue, 13 Dec 2016 00:30:51 +0000 (00:30 +0000)]
Minor docstring and comment fixes to ispell.el

lisp/textmodes/ispell.el (ispell-aspell-dictionary-alist): Mention
ispell-aspell-dictionary-alist, not ispell-dictionary-alist.
(ispell-set-spellchecker-params): Change double-single quotes to
single single quotes in comment.

7 years agoRemove unused variable
Reuben Thomas [Mon, 5 Dec 2016 21:11:52 +0000 (21:11 +0000)]
Remove unused variable

* lisp/textmodes/ispell.el (current-ispell-directory): Remove.

7 years agoRemove XEmacs-specific ispell-with-no-warnings
Reuben Thomas [Sun, 4 Dec 2016 22:01:56 +0000 (22:01 +0000)]
Remove XEmacs-specific ispell-with-no-warnings

* lisp/textmodes/ispell.el (ispell-with-no-warnings): Remove this
defmacro, needed only for XEmacs.
(ispell-command-loop, ispell-message): Use with-no-warnings directly.

7 years agoRemove meaningless defconst ispell-version
Reuben Thomas [Sun, 4 Dec 2016 21:58:00 +0000 (21:58 +0000)]
Remove meaningless defconst ispell-version

* lisp/textmodes/ispell.el (ispell-version): Since ispell.el is now
firmly part of Emacs, and the version hasn’t changed since 2003, and
isn’t used anywhere, remove it.  3rd-party code can better use the
Emacs version, or feature or function checks.
(ispell-check-version): No longer report ispell.el version.

7 years agoRemove boundp test for always-bound symbol
Reuben Thomas [Sun, 4 Dec 2016 21:55:19 +0000 (21:55 +0000)]
Remove boundp test for always-bound symbol

* lisp/textmodes/ispell.el (ispell-message): mail-yank-prefix is
defvar’d at the top of the file, so remove a test to see if it is
bound.

7 years agoRemove support for ispell < 3.1.12
Reuben Thomas [Sun, 4 Dec 2016 21:50:18 +0000 (21:50 +0000)]
Remove support for ispell < 3.1.12

* lisp/textmodes/ispell.el (ispell-offset): Remove.
(ispell-check-version): Require ispell >= 3.1.12, released in 1994.
(ispell-process-line): No longer use ispell-offset.

7 years agoRemove unused constant
Reuben Thomas [Sun, 4 Dec 2016 21:47:02 +0000 (21:47 +0000)]
Remove unused constant

* lisp/textmodes/ispell.el (ispell-required-version): Remove.

7 years agoRemove support for old versions of supercite and GNUS from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 19:20:19 +0000 (19:20 +0000)]
Remove support for old versions of supercite and GNUS from ispell.el

* lisp/textmodes/ispell.el (ispell-message): Require supercite >= 3.0
and GNUS >= 5.  Not exactly the bleeding edge!

7 years agoRemove remaining mentions of XEmacs from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:39:42 +0000 (14:39 +0000)]
Remove remaining mentions of XEmacs from ispell.el

* lisp/textmodes/ispell.el (ispell-valid-dictionary-list):
(ispell-add-per-file-word-list): Remove mentions of XEmacs from
comments.

7 years agoRemove XEmacs-specific minibuffer handling code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:38:51 +0000 (14:38 +0000)]
Remove XEmacs-specific minibuffer handling code from ispell.el

* lisp/textmodes/ispell.el (ispell-init-process): Assume we are not in
XEmacs.

7 years agoRemove XEmacs-specific horizontal scrollbar handling in ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:37:37 +0000 (14:37 +0000)]
Remove XEmacs-specific horizontal scrollbar handling in ispell.el

* lisp/textmodes/ispell.el (ispell-command-loop): Remove
XEmacs-specific code.

7 years agoRemove XEmacs-specific code dealing with enable-multibyte-characters
Reuben Thomas [Sun, 4 Dec 2016 14:35:42 +0000 (14:35 +0000)]
Remove XEmacs-specific code dealing with enable-multibyte-characters

* lisp/textmodes/ispell.el (ispell-decode-string):
(ispell-init-process):  Remove XEmacs-specific guard.

7 years agoRemove XEmacs-specific code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 14:19:26 +0000 (14:19 +0000)]
Remove XEmacs-specific code from ispell.el

* lisp/textmodes/ispell.el (ispell-menu-xemacs): Remove
(ispell-menu-map-needed): Remove XEmacs-specific check.
(ispell-word): Remove XEmacs-specific extent code.
(ispell-init-process): Remove XEmacs workaround for local add-hook.
Assume we have set-process-query-on-exit-flag.
(ispell-kill-ispell, ispell-change-dictionary): Remove XEmacs
workaround for called-interactively-p.

7 years agoRemove some commented-out code
Reuben Thomas [Sun, 4 Dec 2016 14:15:50 +0000 (14:15 +0000)]
Remove some commented-out code

lisp/textmodes/ispell.el (ispell-process)
ispell-valid-dictionary-list): Remove commented-out code.

7 years agoRemove XEmacs and old Emacs highlighting code
Reuben Thomas [Sun, 4 Dec 2016 14:05:07 +0000 (14:05 +0000)]
Remove XEmacs and old Emacs highlighting code

* lisp/textmodes/ispell.el
(ispell-highlight-spelling-error-xemacs): Remove.
(ispell-highlight-spelling-error): Assume display-color-p exists.

7 years agoAssume Emacs supports [:alpha:] in regexps
Reuben Thomas [Sun, 4 Dec 2016 14:02:48 +0000 (14:02 +0000)]
Assume Emacs supports [:alpha:] in regexps

* lisp/textmodes/ispell.el (ispell-emacs-alpha-regexp): Remove.
(ispell-set-spellchecker-params): Remove tests of
ispell-emacs-alpha-regexp.

7 years agoRemove some XEmacs-specific code from ispell.el
Reuben Thomas [Sun, 4 Dec 2016 13:59:59 +0000 (13:59 +0000)]
Remove some XEmacs-specific code from ispell.el

* lisp/textmodes/ispell.el: Remove XEmacs menubar setup.
(ispell-int-char): Remove.

7 years agoGeneralise over-specific documentation
Reuben Thomas [Sun, 4 Dec 2016 13:55:31 +0000 (13:55 +0000)]
Generalise over-specific documentation

* lisp/textmodes/ispell.el (ispell-personal-dictionary): Rather than
document precise personal wordlist filenames for only two supported
spelling checkers, simply say that the default personal dictionary
depends on the chosen spelling checker.  The user can check the
spelling checker’s documentation if necessary.  This is simpler, and
works for other supported (and future, or unknown) spelling checkers.

7 years agoRemove tests for built-in functions
Reuben Thomas [Sun, 4 Dec 2016 13:52:04 +0000 (13:52 +0000)]
Remove tests for built-in functions

* lisp/textmodes/ispell.el (buffer-substring-no-properties): Remove
back-up definition.
(ispell-add-per-file-word-list): Remove tests for comment-padright and
comment-normalize-vars.

7 years agoRemove unused ispell-looking-back
Reuben Thomas [Sun, 4 Dec 2016 01:06:26 +0000 (01:06 +0000)]
Remove unused ispell-looking-back

* lisp/textmodes/ispell.el (ispell-looking-back): Remove unused alias.

7 years agoAssume we have version<= for checking ispell version
Reuben Thomas [Sun, 4 Dec 2016 00:54:04 +0000 (00:54 +0000)]
Assume we have version<= for checking ispell version

* lisp/textmodes/ispell.el (ispell-check-minver): Remove.
(ispell-check-version): Use version<= directly.

7 years agoRemove ispell.el pre-GNU Emacs comments
Reuben Thomas [Sun, 4 Dec 2016 00:49:35 +0000 (00:49 +0000)]
Remove ispell.el pre-GNU Emacs comments

* lisp/textmodes/ispell.el (Commentary): Remove original maintainer
  details, as Emacs version, bug report address and so forth should be
  used instead for this version.  Remove in-line change history; use
  git instead.

7 years agoMore small fixes for image-dired
Mark Oteiza [Tue, 13 Dec 2016 16:47:21 +0000 (11:47 -0500)]
More small fixes for image-dired

* lisp/image-dired.el: Fix commentary to refer to correct Emacs manual
node.
(image-dired--with-db-file): Add declare forms.
(image-dired-hidden-p): Rewrite with cl-loop.  It's not necessary to
run through the whole list.

7 years agoRemove image-dired-kill-buffer-and-window
Mark Oteiza [Tue, 13 Dec 2016 16:41:45 +0000 (11:41 -0500)]
Remove image-dired-kill-buffer-and-window

This breaks window layout, especially when quitting a
image-dired-display-image-mode buffer.
* lisp/image-dired.el (image-dired-thumbnail-mode-map):
(image-dired-display-image-mode-map): Replace in keymap and menu items
bindings to image-dired-kill-buffer-and-window with quit-window.
(image-dired-kill-buffer-and-window): Remove.

7 years agoReplace image-dired-setup-dired-keybindings with a minor mode
Mark Oteiza [Tue, 13 Dec 2016 16:32:04 +0000 (11:32 -0500)]
Replace image-dired-setup-dired-keybindings with a minor mode

* lisp/image-dired.el (image-dired-thumbnail-mode): Fix docstring to
remove mention of nonexistent image-dired-dired and to refer to the
new minor mode.
(image-dired-minor-mode-map): New keymap assimilated from
image-dired-setup-dired-keybindings.  In the future, the keymap parent
should be removed, and perhaps also the duplicate bindings that
already exist in dired-mode-map.
(image-dired-setup-dired-keybindings): Remove.  Replace with an
obsolete function alias.
(image-dired-minor-mode): New minor mode, assuming the role of
image-dired-setup-dired-keybindings.

7 years ago* test/src/regex-resources/PTESTS: Convert to UTF-8.
Paul Eggert [Tue, 13 Dec 2016 07:16:42 +0000 (23:16 -0800)]
* test/src/regex-resources/PTESTS: Convert to UTF-8.

7 years agoClarify thread-signal semantics
Noam Postavsky [Tue, 13 Dec 2016 02:21:14 +0000 (21:21 -0500)]
Clarify thread-signal semantics

* doc/lispref/threads.texi (Basic Thread Functions): Explain that the
thread will be signaled as soon as possible.

7 years agoClean up var watcher disabling on thread switching
Noam Postavsky [Sun, 11 Dec 2016 18:08:15 +0000 (13:08 -0500)]
Clean up var watcher disabling on thread switching

* src/data.c (Fset_default): Move code into new C level function,
`set_default_internal'.
(set_default_internal): New function, like `Fset_default' but also takes
additional bindflag parameter.
(set_internal): Only call `notify_variable_watchers' if bindflag is not
SET_INTERNAL_THREAD_SWITCH.
* src/eval.c (do_specbind, do_one_unbind): Add bindflag parameter,
passed on to set_internal and set_default_internal.  Adjust callers.
(rebind_for_thread_switch, unbind_for_thread_switch): Pass
SET_INTERNAL_THREAD_SWITCH to do_specbind, do_one_unbind instead of
temporarily adjusting symbol's trapped_write field.

7 years agoMinor fix for define-derived-mode
Glenn Morris [Tue, 13 Dec 2016 01:03:20 +0000 (20:03 -0500)]
Minor fix for define-derived-mode

* lisp/emacs-lisp/derived.el (define-derived-mode):
Do not let eg eval-defun reset the values of syntax or abbrev tables,
since they might have been defined externally.  (Bug#16160)

7 years ago* build-aux/git-hooks/pre-commit: Add whitespace comment.
Paul Eggert [Mon, 12 Dec 2016 22:54:30 +0000 (14:54 -0800)]
* build-aux/git-hooks/pre-commit: Add whitespace comment.

7 years agoMove backtrace to ELisp using a new mapbacktrace primitive
Clément Pit--Claudel [Mon, 5 Dec 2016 05:52:14 +0000 (00:52 -0500)]
Move backtrace to ELisp using a new mapbacktrace primitive

* src/eval.c (get_backtrace_starting_at, backtrace_frame_apply)
(Fmapbacktrace, Fbacktrace_frame_internal): New functions.
(get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'.

* lisp/subr.el (backtrace--print-frame): New function.
(backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'.
(backtrace-frame): Reimplement using `backtrace-frame--internal'.

* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to
`mapbacktrace' instead of searching for "(debug" in the output of
`backtrace'.

* test/lisp/subr-tests.el (subr-test-backtrace-simple-tests)
(subr-test-backtrace-integration-test): New tests.

* doc/lispref/debugging.texi (Internals of Debugger): Document
`mapbacktrace' and missing argument BASE of `backtrace-frame'.

7 years agoUse C99 syntax for font drivers
Paul Eggert [Mon, 12 Dec 2016 22:27:35 +0000 (14:27 -0800)]
Use C99 syntax for font drivers

Problem reported by Daniel Colascione in:
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00515.html
* src/ftcrfont.c (ftcrfont_driver):
* src/ftfont.c (ftfont_driver):
* src/ftxfont.c (ftxfont_driver):
* src/macfont.m (macfont_driver):
* src/nsfont.m (nsfont_driver):
* src/xfont.c (xfont_driver):
* src/xftfont.c (xftfont_driver):
Use C99 syntax, not the old GNU C syntax.

7 years agoObsolete gs.el
Glenn Morris [Mon, 12 Dec 2016 22:17:34 +0000 (17:17 -0500)]
Obsolete gs.el

* lisp/gs.el: Move to lisp/obsolete.  (Bug#1524)
* doc/lispref/display.texi (Image Formats): Remove postscript.
(PostScript Images): Remove section.
* doc/lispref/elisp.texi: Update menu.

7 years agoUn-revert recent Ffset change
Glenn Morris [Mon, 12 Dec 2016 20:21:48 +0000 (15:21 -0500)]
Un-revert recent Ffset change

* src/data.c (Ffset): Reinstate the check for "nil".

7 years agoMinor advice.el fix
Glenn Morris [Mon, 12 Dec 2016 20:20:39 +0000 (15:20 -0500)]
Minor advice.el fix

* lisp/emacs-lisp/advice.el (ad-preactivate-advice):
Avoid setting the function definition of nil.
This was happening during bootstrap of org-compat.el,
apparently due to eager macro expansion of code behind
a (featurep 'xemacs) test.

7 years agoMake etags-tests work in out-of-tree builds
Eli Zaretskii [Mon, 12 Dec 2016 17:56:03 +0000 (19:56 +0200)]
Make etags-tests work in out-of-tree builds

* test/lisp/progmodes/etags-tests.el (etags-bug-158)
(etags-bug-23164): Make them work in an out-of-tree build.
Reported by Ken Brown <kbrown@cornell.edu>.

7 years agoAvoid crashing if a new thread is signaled right away
Eli Zaretskii [Mon, 12 Dec 2016 17:08:21 +0000 (19:08 +0200)]
Avoid crashing if a new thread is signaled right away

* src/thread.c (post_acquire_global_lock): Don't raise the pending
signal if the thread's handlers were not yet set up, as that will
cause Emacs to exit with a fatal error.  This can happen if a
thread is signaled as soon as make-thread returns, before the new
thread had an opportunity to acquire the global lock, set up the
handlers, and call the thread function.

* test/src/thread-tests.el (thread-signal-early): New test.

7 years agoFix point motion in cloned buffers
Eli Zaretskii [Mon, 12 Dec 2016 16:03:40 +0000 (18:03 +0200)]
Fix point motion in cloned buffers

* src/thread.c (post_acquire_global_lock): Call
set_buffer_internal_2 instead of tricking set_buffer_internal_1
into resetting the current buffer even if it didn't change.  This
avoids bug#25165, caused by failing to record the modified values
of point and mark, because current_buffer was set to NULL.  Also,
don't bother re-setting the buffer if there was no thread switch,
as that just wastes cycles.
* src/buffer.c (set_buffer_internal_2): New function, with most of
the body of set_buffer_internal_1, but without the test for B
being identical to the current buffer.
(set_buffer_internal_1): Call set_buffer_internal_2 if B is not
identical to the current buffer.
* src/buffer.h (set_buffer_internal_2): Add prototype.

* test/src/thread-tests.el (thread-sticky-point): New test.

7 years agoFurther improvements in Tramp's file name unquoting
Michael Albinus [Mon, 12 Dec 2016 10:12:34 +0000 (11:12 +0100)]
Further improvements in Tramp's file name unquoting

* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region): Unquote localname.
(tramp-adb-handle-copy-file): Implement direct copy on remote device.
(tramp-adb-handle-rename-file): Quote arguments, add "-f" to force.

* lisp/net/tramp.el (tramp-file-name-unquote-localname): New defun.
(tramp-handle-file-name-case-insensitive-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-file-attributes)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share)
(tramp-smb-get-localname): Use it.

* test/lisp/net/tramp-tests.el (tramp--test-docker-p): New defun.
(tramp--test-special-characters, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls): Use it.

7 years agoStrengthen conditions for resizing sibling windows (Bug#25169)
Martin Rudalics [Mon, 12 Dec 2016 09:16:23 +0000 (10:16 +0100)]
Strengthen conditions for resizing sibling windows (Bug#25169)

* lisp/window.el (window-resize, delete-window): Resize other siblings
only if `window-combination-resize' equals t (Bug#25169).

7 years agoQuote filenames containing '~' in prompts
Noam Postavsky [Fri, 28 Oct 2016 02:17:11 +0000 (22:17 -0400)]
Quote filenames containing '~' in prompts

When in a directory named '~', the default value given by
`read-file-name' should be quoted by prepending '/:', in order to
prevent it from being interpreted as referring to the $HOME
directory (Bug#16984).

* lisp/minibuffer.el (minibuffer-maybe-quote-filename): New function.
(completion--sifn-requote, read-file-name-default): Use it instead of
`minibuffer--double-dollars'.
* test/lisp/files-tests.el (files-test-read-file-in-~): Test it.

7 years agoUndo part of last change
Eli Zaretskii [Sun, 11 Dec 2016 17:19:10 +0000 (19:19 +0200)]
Undo part of last change

* src/thread.h:
* src/keyboard.c:
* src/keyboard.h: Undo part of last change:
input_available_clear_time is again a global variable.

7 years agoAvoid aborts when a thread signals an error
Eli Zaretskii [Sun, 11 Dec 2016 15:59:55 +0000 (17:59 +0200)]
Avoid aborts when a thread signals an error

* src/thread.h (struct thread_state): Add members
m_waiting_for_input and m_input_available_clear_time.
(waiting_for_input, input_available_clear_time): New macros.
* src/keyboard.c (waiting_for_input, input_available_clear_time):
Remove; they are now macros that reference the current thread.
(Bug#25171)
* src/w32select.c: Don't include keyboard.h.

* test/src/thread-tests.el (thread-errors): New test.