Nickolas Lloyd [Sun, 1 Jan 2017 19:02:26 +0000 (14:02 -0500)]
; Fix a performance regression in bytecode JIT compiler
; * src/bytecode-jit.c: Make `functions' array static const to allow the
compiler to elide the array accesses. This brings `jit_byte_code__'
performance back in line with the more explicit, repetitive
pre-
639dfad3ae2a478652a399986b03e5eec219eab1 version.
Nickolas Lloyd [Sun, 1 Jan 2017 00:36:32 +0000 (19:36 -0500)]
Free JIT contexts when compiled functions cleaned up
* src/alloc.c (cleanup_vector): Call jit_context_destroy () to destroy a
compiled function's associated context when it's pseudovector is destroyed.
Nickolas Lloyd [Sat, 31 Dec 2016 23:21:25 +0000 (18:21 -0500)]
; Store jit_function_t value instead of closure.
; * src/bytecode-jit.c (jit_byte_code__, jit_exec): Use the
COMPILED_JIT_ID field for storing the jit_function_t value so that
we can retrive the jit_context_t later for destruction.
Nickolas Lloyd [Sat, 31 Dec 2016 04:19:14 +0000 (23:19 -0500)]
; Make JIT compilation loop more readable.
; * src/bytecode-jit.c (jit_byte_code__): Condense cases using
JIT_CALL_STACK_N and JIT_CALL_STACK_MANY.
; * src/bytecode.h: Define function called and number of stack items for
each bytecode instruction.
Nickolas Lloyd [Tue, 27 Dec 2016 18:27:18 +0000 (13:27 -0500)]
; Change JIT_* macros to return a value.
Nickolas Lloyd [Tue, 27 Dec 2016 16:55:44 +0000 (11:55 -0500)]
; Create a new context for each JIT compilation.
; * src/bytecode-jit.c (jit_byte_code__, jit_exec): Add emacs_jit_context
struct to hold common signatures and such.
Nickolas Lloyd [Sun, 25 Dec 2016 05:32:12 +0000 (00:32 -0500)]
; Fix compiler warnings in src/bytecode-jit.c
Nickolas Lloyd [Sun, 25 Dec 2016 05:21:01 +0000 (00:21 -0500)]
Use inline functions instead of macros for JIT operations.
* src/bytecode-jit.c (jit_inc, jit_push, jit_top, jit_pop, jit_call)
(jit_call_vaarg, jit_call_with_stack_n, jit_call_with_stack_many)
(jit_byte_code__): Create inline functions to clean up macro messiness.
Nickolas Lloyd [Fri, 23 Dec 2016 21:21:19 +0000 (16:21 -0500)]
; Fix a possible bug with JIT-compiled functions in the call stack
* src/bytecode-jit.c (jit_byte_code__, jit_exec): Insert entry into
`byte_stack_list' from `jit_exec' instead of `jit_byte_code__'. It seems like
this would be needed for proper stack unwinding in `unwind_to_catch'.
* src/bytecode.c (relocate_byte_stack) [HAVE_LIBJIT]: Skip entries in
`byte_stack_list' with no associated bytecode stack.
Nickolas Lloyd [Fri, 23 Dec 2016 19:15:50 +0000 (14:15 -0500)]
; * src/bytecode-jit.c: Remove #include of uneeded headers.
Nickolas Lloyd [Fri, 23 Dec 2016 05:44:45 +0000 (00:44 -0500)]
Make JIT support entirely optional.
; * src/bytecode-jit.c:
; * src/bytecode.c:
; * src/bytecode.h:
; * src/emacs.c:
; * src/lisp.h: Add guards around all JIT-related code.
Nickolas Lloyd [Fri, 23 Dec 2016 05:07:30 +0000 (00:07 -0500)]
; * configure.ac: Default $with_libjit to no, and echo status of JIT support.
Nickolas Lloyd [Fri, 23 Dec 2016 01:05:16 +0000 (20:05 -0500)]
; Minor reorg of bytecode interpreter/JIT compiler
; * src/bytecode.c (exec_byte_code, exec_byte_code__): Use exec_byte_code as
the single entrypoint for both the interpreter and JIT compiler.
; * src/bytecode-jit.c (jit_byte_code): Remove jit_byte_code to be replaced
by exec_byte_code.
; * src/bytecode.h: Add function prototypes.
; * src/eval.c (funcall_lambda): Use exec_byte_code instead of jit_byte_code.
; * src/lisp.h: Update function prototypes.
Nickolas Lloyd [Fri, 23 Dec 2016 00:18:40 +0000 (19:18 -0500)]
; * src/bytecode.h: Insert GPL file header.
Nickolas Lloyd [Fri, 23 Dec 2016 00:16:22 +0000 (19:16 -0500)]
; * src/bytecode-jit.c: Fix copyright years.
Nickolas Lloyd [Fri, 23 Dec 2016 00:06:36 +0000 (19:06 -0500)]
; Merge branch 'master' into nick.lloyd-bytecode-jit
Nickolas Lloyd [Thu, 22 Dec 2016 22:40:44 +0000 (17:40 -0500)]
Enable optimization of JITed functions.
; * src/bytecode-jit.c (jit_byte_code__): Set highest optimization level when
compiling functions.
Nickolas Lloyd [Sat, 12 Nov 2016 23:48:04 +0000 (18:48 -0500)]
Add bytecode JIT compilation capabilities
This change adds several functions that utilize GNU libjit to compile
byte-compiled lisp functions to machine code. The functionality is exposed
in two ways: specific functions can be JIT compiled from lisp with the
`jit-compile' function, or JIT compilation can be enabled globally by setting
`byte-code-jit-on' to non-nil. Once the function has been JIT compiled, the
machine-code version will be executed in place of the bytecode version.
* src/bytecode-jit.c (native_varref, native_ifnil, native_ifnonnil)
(native_car, native_eq, native_memq, native_cdr, native_varset)
(native_unbind_to, byte_code_quit, native_save_excursion)
(native_save_restriction, native_save_window_excursion, native_catch)
(native_pophandler, native_pushhandler1, native_pushhandler2)
(native_unwind_protect, native_temp_output_buffer_setup, native_nth)
(native_symbolp, native_consp, native_stringp, native_listp, native_not)
(native_add1, native_eqlsign, native_negate, native_point, native_point_max)
(native_point_min, native_current_column, native_interactive_p)
(native_char_syntax, native_elt, native_car_safe, native_cdr_safe)
(native_number_p, native_integer_p, emacs_jit_init, jit_exec, jit_byte_code__)
(jit_byte_code, Fjit_compile, syms_of_bytecode_jit): New file encapsulating
JIT compilation functionality and execution functionality.
* src/bytecode.c:
* src/bytecode.h: Extract useful data structures and macro definitions into a
separate header to allow sharing between src/bytecode{,-jit}.c.
; * src/Makefile.in: Add src/bytecode-jit.o to Makefile recipe.
; * src/lisp.h: Add function prototypes for new JIT functions.
; * src/emacs.c: Call syms_of_bytecode_jit to initialize JIT-related symbols.
Nickolas Lloyd [Thu, 3 Nov 2016 01:10:43 +0000 (21:10 -0400)]
Add COMPILED_JIT_ID field to byte-code pseudovectors
* src/alloc.c (make_byte_code, Fmake_byte_code): Remove make_byte_code,
reserve space in allocated vectors for COMPILED_JIT_ID recordkeeping field.
* src/lisp.h: Update function prototypes, update Lisp_Compiled enum.
* src/lread.c (read1) <compiled>: Use Fmake_byte_code in place of
make_byte_code.
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.
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.
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.
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.
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.
Mark Oteiza [Tue, 20 Dec 2016 01:37:46 +0000 (20:37 -0500)]
Update NEWS
* etc/NEWS (Image-Dired): New section.
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.
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.
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.
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.
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)
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"
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)
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.
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.
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.
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.
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.
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'.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Mark Oteiza [Fri, 16 Dec 2016 00:58:33 +0000 (19:58 -0500)]
* lisp/image-dired.el: Turn on lexical-binding.
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.
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.
Paul Eggert [Thu, 15 Dec 2016 20:06:01 +0000 (12:06 -0800)]
* emacs-document.svg: Append newline.
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.
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.
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.
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)
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.
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.
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
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.
Mark Oteiza [Thu, 15 Dec 2016 01:36:06 +0000 (20:36 -0500)]
* lisp/image-dired.el (image-dired-create-thumb): Create parent directories.
Mark Oteiza [Wed, 14 Dec 2016 21:36:31 +0000 (16:36 -0500)]
* lisp/image-mode.el (image-mode-winprops-alist): Add docstring.
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.
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.
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.
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.
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.
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.
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.
Reuben Thomas [Mon, 5 Dec 2016 21:11:52 +0000 (21:11 +0000)]
Remove unused variable
* lisp/textmodes/ispell.el (current-ispell-directory): Remove.
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.
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.
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.
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.
Reuben Thomas [Sun, 4 Dec 2016 21:47:02 +0000 (21:47 +0000)]
Remove unused constant
* lisp/textmodes/ispell.el (ispell-required-version): Remove.
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!
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Paul Eggert [Tue, 13 Dec 2016 07:16:42 +0000 (23:16 -0800)]
* test/src/regex-resources/PTESTS: Convert to UTF-8.
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.
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.
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)
Paul Eggert [Mon, 12 Dec 2016 22:54:30 +0000 (14:54 -0800)]
* build-aux/git-hooks/pre-commit: Add whitespace comment.
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'.
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.
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.