1. 13 Dec, 2016 10 commits
    • Reuben Thomas's avatar
      Remove unused ispell-looking-back · a3ca97e7
      Reuben Thomas authored
      * lisp/textmodes/ispell.el (ispell-looking-back): Remove unused alias.
    • Reuben Thomas's avatar
      Assume we have version<= for checking ispell version · 8edf0eb4
      Reuben Thomas authored
      * lisp/textmodes/ispell.el (ispell-check-minver): Remove.
      (ispell-check-version): Use version<= directly.
    • Reuben Thomas's avatar
      Remove ispell.el pre-GNU Emacs comments · f25c8b34
      Reuben Thomas authored
      * 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's avatar
      More small fixes for image-dired · aacb20c0
      Mark Oteiza authored
      * lisp/image-dired.el: Fix commentary to refer to correct Emacs manual
      (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's avatar
      Remove image-dired-kill-buffer-and-window · 86762eb1
      Mark Oteiza authored
      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's avatar
      Replace image-dired-setup-dired-keybindings with a minor mode · bed03738
      Mark Oteiza authored
      * 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
    • Paul Eggert's avatar
    • Noam Postavsky's avatar
      Clarify thread-signal semantics · c78f872a
      Noam Postavsky authored
      * doc/lispref/threads.texi (Basic Thread Functions): Explain that the
      thread will be signaled as soon as possible.
    • Noam Postavsky's avatar
      Clean up var watcher disabling on thread switching · f66174a1
      Noam Postavsky authored
      * src/data.c (Fset_default): Move code into new C level function,
      (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
      * 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's avatar
      Minor fix for define-derived-mode · 8db7b65d
      Glenn Morris authored
      * 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)
  2. 12 Dec, 2016 12 commits
    • Paul Eggert's avatar
    • Clément Pit--Claudel's avatar
      Move backtrace to ELisp using a new mapbacktrace primitive · 27cada03
      Clément Pit--Claudel authored
      * 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
      * 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's avatar
      Use C99 syntax for font drivers · a41ded87
      Paul Eggert authored
      Problem reported by Daniel Colascione in:
      * 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's avatar
      Obsolete gs.el · 3c655230
      Glenn Morris authored
      * 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.
    • Glenn Morris's avatar
      Un-revert recent Ffset change · ffb13021
      Glenn Morris authored
      * src/data.c (Ffset): Reinstate the check for "nil".
    • Glenn Morris's avatar
      Minor advice.el fix · 61f8c238
      Glenn Morris authored
      * 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.
    • Eli Zaretskii's avatar
      Make etags-tests work in out-of-tree builds · 940df477
      Eli Zaretskii authored
      * 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>.
    • Eli Zaretskii's avatar
      Avoid crashing if a new thread is signaled right away · 825f4dd4
      Eli Zaretskii authored
      * 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.
    • Eli Zaretskii's avatar
      Fix point motion in cloned buffers · a416e1d6
      Eli Zaretskii authored
      * 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.
    • Michael Albinus's avatar
      Further improvements in Tramp's file name unquoting · 00d4ba27
      Michael Albinus authored
      * 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.
      * lisp/net/tramp-gvfs.el (tramp-gvfs-get-file-attributes)
      (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
      * 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.
    • Martin Rudalics's avatar
      Strengthen conditions for resizing sibling windows (Bug#25169) · 184ed361
      Martin Rudalics authored
      * lisp/window.el (window-resize, delete-window): Resize other siblings
      only if `window-combination-resize' equals t (Bug#25169).
    • Noam Postavsky's avatar
      Quote filenames containing '~' in prompts · a92a027d
      Noam Postavsky authored
      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
      * test/lisp/files-tests.el (files-test-read-file-in-~): Test it.
  3. 11 Dec, 2016 11 commits
  4. 10 Dec, 2016 7 commits
    • Andreas Schwab's avatar
      * Makefile.in (install-etc): Don't prepend $(DESTDIR) to commands in · 2335b910
      Andreas Schwab authored
      system unit file.
    • Glenn Morris's avatar
      ; Fix copyright years in new files · 25a52ca6
      Glenn Morris authored
    • Philipp Stephani's avatar
      ; Update file name in comment · 759415df
      Philipp Stephani authored
    • Eli Zaretskii's avatar
      Support concurrency in Emacs Lisp · 2412a1fc
      Eli Zaretskii authored
      Merge branch 'test-concurrency'
      * src/thread.c:
      * src/thread.h:
      * src/systhread.c:
      * src/systhread.h: New files.
      * src/xgselect.c (xg_select): Avoid using SAFE_NALLOCA and use
      xnmalloc unconditionally.
      * src/window.c (struct save_window_data): Rename current_buffer to
      * src/w32proc.c (sys_select): Change the function signature to
      closer fit 'pselect' on Posix hosts.
      * src/search.c:
      * src/regex.h: Convert some globals to macros that reference
      thread-specific values.
      * src/process.c (pset_thread, add_non_keyboard_read_fd)
      (add_process_read_fd, add_non_blocking_write_fd)
      (recompute_input_desc, compute_input_wait_mask)
      (compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
      (compute_write_mask, clear_waiting_thread_info)
      (update_processes_for_thread_death, Fset_process_thread)
      (Fprocess_thread): New functions.
      (enum fd_bits): New enumeration.
      (fd_callback_data): Add 'thread' and 'waiting_thread', rename
      'condition' to 'flags'.
      (set_process_filter_masks, create_process, create_pty)
      (Fmake_serial_process, finish_after_tls_connection)
      (connect_network_socket, deactivate_process)
      (server_accept_connection, wait_reading_process_output)
      (Fcontinue_process, Fstop_process, keyboard_bit_set)
      (add_timer_wait_descriptor, add_keyboard_wait_descriptor)
      (delete_keyboard_wait_descriptor): Use the new functions instead
      of manipulating fd flags and masks directly.
      (syms_of_process): Defsubr the new primitives.
      * src/print.c (print_object): Print threads, mutexes, and
      conditional variables.
      * src/lisp.h (enum pvec_type): New values PVEC_THREAD, PVEC_MUTEX,
      and PVEC_CONDVAR.
      (CHECK_THREAD, CHECK_MUTEX, CHECK_CONDVAR): New inline functions.
      (struct handler): Add back byte_stack.  Rename lisp_eval_depth to
      * src/eval.c (specpdl_kind, specpdl_arg, do_specbind)
      (rebind_for_thread_switch, do_one_unbind)
      (unbind_for_thread_switch): New functions.
      (init_eval): 'handlerlist' is not malloc'ed.
      (specbind): Call do_specbind.
      (unbind_to): Call do_one_unbind.
      (mark_specpdl): Accept 2 arguments.
      (mark_specpdl): Mark the saved value in a let-binding.
      * src/emacs.c (main): Call init_threads_once, init_threads, and
      * src/data.c (Ftype_of): Support thread, mutex, and condvar
      (Fthreadp, Fmutexp, Fcondition_variable_p): New functions.
      (syms_of_data): DEFSYM and defsubr new symbols and primitives.
      * src/bytecode.c (struct byte_stack, FETCH, CHECK_RANGE)
      (BYTE_CODE_QUIT): Add back.
      (exec_byte_code): Add back byte stack manipulation.
      * src/alloc.c (cleanup_vector): Handle threads, mutexes, and
      conditional variables.
      (mark_stack): Now extern; accept additional argument 'bottom'.
      (flush_stack_call_func): New function.
      (garbage_collect_1): Call mark_threads and unmark_threads.  Don't
      mark handlers.
      * src/.gdbinit (xbytecode): Add back.
      * test/src/thread-tests.el: New tests.
      * test/src/data-tests.el (binding-test-manual)
      (binding-test-setq-default, binding-test-makunbound)
      (binding-test-defvar-bool, binding-test-defvar-int)
      (binding-test-set-constant-t, binding-test-set-constant-nil)
      (binding-test-set-constant-nil): New tests.
      * doc/lispref/processes.texi (Processes and Threads): New
      * doc/lispref/threads.texi: New file
      * doc/lispref/elisp.texi (Top): Include it.
      * doc/lispref/objects.texi (Thread Type, Mutex Type)
      (Condition Variable Type): New subsections.
      (Type Predicates): Add thread-related predicates.
      * doc/lispref/objects.texi (Editing Types):
      * doc/lispref/elisp.texi (Top): Update higher-level menus.
      * etc/NEWS: Mention concurrency features.
    • Eli Zaretskii's avatar
      Fix error messages in thread.c · 828b4560
      Eli Zaretskii authored
      * src/thread.c (lisp_mutex_unlock, Fcondition_wait)
      (Fcondition_notify, Fthread_join): Fix error messages.
    • Eli Zaretskii's avatar
      Improve doc strings in thread.c · c364d62f
      Eli Zaretskii authored
      * src/thread.c (Fmake_condition_variable, Fcondition_wait)
      (Fcondition_notify, Fcondition_mutex, Fcondition_name, Fmake_thread)
      (Fthread_join, Fall_threads): Doc fixes.
    • Eli Zaretskii's avatar
      Fix building with check-lisp-object-type · e4df093e
      Eli Zaretskii authored
      * src/thread.c (mark_one_thread): Use NILP to compare with
      m_saved_last_thing_searched, which is a Lisp object.  Reported by
      Andreas Politz <politza@hochschule-trier.de>.