]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years ago; Add further traces to tramp-tests.el
Michael Albinus [Tue, 18 Jul 2017 16:10:09 +0000 (18:10 +0200)]
; Add further traces to tramp-tests.el

7 years ago* emacs-lisp/cl-lib.el (cl--old-struct-type-of): Accept `[]'
Stefan Monnier [Tue, 18 Jul 2017 16:01:27 +0000 (12:01 -0400)]
* emacs-lisp/cl-lib.el (cl--old-struct-type-of): Accept `[]'

7 years agoFix indentation when display-line-numbers is non-nil
Eli Zaretskii [Tue, 18 Jul 2017 14:25:30 +0000 (17:25 +0300)]
Fix indentation when display-line-numbers is non-nil

* src/xdisp.c (x_produce_glyphs): Fix a typo in deciding whether
to go one more tab stop to display a TAB.  (Bug#27743)

7 years agoDon't use gtk_widget_get_scale_factor on old GTK3 versions
Lars Ingebrigtsen [Tue, 18 Jul 2017 13:31:28 +0000 (15:31 +0200)]
Don't use gtk_widget_get_scale_factor on old GTK3 versions

* src/gtkutil.c (xg_get_scale): gtk_widget_get_scale_factor is
only present since GTK 3.10.

7 years agoLet delete-selection-mode work with popup-menu commands (Bug#27569)
Noam Postavsky [Wed, 12 Jul 2017 01:09:10 +0000 (21:09 -0400)]
Let delete-selection-mode work with popup-menu commands (Bug#27569)

* lisp/menu-bar.el (popup-menu): Run `pre-command-hook' with
`this-command' set to the selected command.

7 years agoPort gnutls.c to older (buggier?) GnuTLS
Paul Eggert [Tue, 18 Jul 2017 07:37:03 +0000 (00:37 -0700)]
Port gnutls.c to older (buggier?) GnuTLS

Problem reported for GnuTLS 3.2.1 by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00716.html
http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00742.html
Although I don't see how this bug can occur with vanilla GnuTLS 3.2.1,
perhaps hydra was using a modified GnuTLS.
* src/gnutls.c (Fgnutls_ciphers): Don't assume GNUTLS_CIPHER_NULL
is at the end of the list returned by gnutls_cipher_list,
or that the earlier ciphers all have non-null names.

7 years agoFix relocation with named cell referred to by a one-symbol formula.
Vincent Belaïche [Mon, 17 Jul 2017 18:54:20 +0000 (20:54 +0200)]
Fix relocation with named cell referred to by a one-symbol formula.

* lisp/ses.el (ses-replace-name-in-formula): Fix bug for it to
work also with one symbol formulas.

* test/lisp/ses-tests.el
(ses-tests-renaming-cell-with-one-symbol-formula): Add new
test for renaming with relocating a one symbol formula.

7 years agoFix symbol completion and document it.
Vincent Belaïche [Mon, 17 Jul 2017 17:58:12 +0000 (19:58 +0200)]
Fix symbol completion and document it.

* doc/misc/ses.texi (Configuring what printer function
applies): Add description of keys for completing local printer
symbols and listing local printers in a help buffer.
(Formulas): Add decription for key to list the named cell
symbols in a help buffer.

* lisp/ses.el (ses-completion-keys): New constant.
(ses--completion-table): New defvar.
(ses--list-orig-buffer): New defvar.
(ses-mode-edit-map): Fixed for symbol completion, plus add
help functions to list named cells or local printers.
(ses-edit-cell-complete-symbol)
(ses--edit-cell-completion-at-point-function): New defuns for
completion during formula edition.
(ses-edit-cell): Redefine dynamically edit keymap for
completion keys to point at the right function.
(ses-read-printer-complete-symbol)
(ses--read-printer-completion-at-point-function): New defuns
for completion during printer edition.
(ses-read-printer): Redefine dynamically edit keymap for
completion keys to point at the right function.
(ses-list-local-printers): New defun.
(ses-list-named-cells): New defun.

7 years agoMove comments around
Lars Ingebrigtsen [Sun, 16 Jul 2017 15:32:43 +0000 (17:32 +0200)]
Move comments around

7 years agoMake scaling work (?) on pre-GTK3 systems
Lars Ingebrigtsen [Sun, 16 Jul 2017 15:31:54 +0000 (17:31 +0200)]
Make scaling work (?) on pre-GTK3 systems

* src/gtkutil.c (xg_get_gdk_scale): Reinstate function.
(xg_get_scale): Use it on non-GTK3 systems.

7 years agoAlways return the GDK scale
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:54:51 +0000 (16:54 +0200)]
Always return the GDK scale

* src/gtkutil.c (xg_get_scale): Return the GDK scale always.

7 years agoRemove usage of the GDK_SCALE variable
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:50:57 +0000 (16:50 +0200)]
Remove usage of the GDK_SCALE variable

* src/gtkutil.c (xg_get_gdk_scale): Remove.
(xg_get_default_scrollbar_height)
(xg_get_default_scrollbar_width): Pass in a frame to check for
scaling.
(xg_frame_set_char_size): Use the API for querying scale
instead of looking at the GDK_SCALE variable.
(xg_get_default_scrollbar_width): Ditto.
(xg_get_default_scrollbar_height): Ditto.
(xg_update_scrollbar_pos): Ditto.

* src/xfns.c (x_set_scroll_bar_default_height): Pass in the
frame to get the width.

7 years agoGet positions of menus and tooltips right on HiDPI
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:42:26 +0000 (16:42 +0200)]
Get positions of menus and tooltips right on HiDPI

* src/gtkutil.c (xg_get_scale): New function.
(xg_show_tooltip): Use it.

* src/xmenu.c (create_and_show_popup_menu): Put menus in the
right place.

7 years ago; * doc/emacs/dired.texi (Subdirectory Motion): Fix a typo. (Bug#27727)
Eli Zaretskii [Mon, 17 Jul 2017 14:58:12 +0000 (17:58 +0300)]
; * doc/emacs/dired.texi (Subdirectory Motion): Fix a typo. (Bug#27727)

7 years agoAllow user control on what starts and ends a paragraph for bidi
Eli Zaretskii [Mon, 17 Jul 2017 14:50:37 +0000 (17:50 +0300)]
Allow user control on what starts and ends a paragraph for bidi

* src/buffer.h (struct buffer): New members
bidi_paragraph_separate_re_ and bidi_paragraph_start_re_.
* src/buffer.c (bset_bidi_paragraph_start_re)
(bset_bidi_paragraph_separate_re): New setters/
(Fbuffer_swap_text): Swap the values of bidi-paragraph-start-re and
bidi-paragraph-separate-re.
(init_buffer_once): Init the values of bidi-paragraph-start-re and
bidi-paragraph-separate-re.
(syms_of_buffer) <bidi-paragraph-start-re, bidi-paragraph-separate-re>:
New per-buffer variables.
* src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start):
Support bidi-paragraph-start-re and bidi-paragraph-separate-re.
(bidi_move_to_visually_next): Handle correctly the case when the
separator matches an empty string.  (Bug#27526)

* doc/emacs/mule.texi (Bidirectional Editing):
* doc/lispref/display.texi (Bidirectional Display): Document
bidi-paragraph-start-re and bidi-paragraph-separate-re.

* etc/NEWS: Mention bidi-paragraph-start-re and
bidi-paragraph-separate-re.

7 years ago* lisp/emacs-lisp/map.el (map-put): Fix redundancy in docstring.
Tino Calancha [Mon, 17 Jul 2017 13:01:17 +0000 (22:01 +0900)]
* lisp/emacs-lisp/map.el (map-put): Fix redundancy in docstring.

7 years agoalist-get: Add optional arg TESTFN
Tino Calancha [Mon, 17 Jul 2017 12:30:50 +0000 (21:30 +0900)]
alist-get: Add optional arg TESTFN

If TESTFN is non-nil, then it is the predicate to lookup
the alist.  Otherwise, use 'eq' (Bug#27584).
* lisp/subr.el (alist-get): Add optional arg FULL.
* lisp/emacs-lisp/map.el (map-elt, map-put): Add optional arg TESTFN.
* lisp/emacs-lisp/gv.el (alist-get): Update expander.
* doc/lispref/lists.texi (Association Lists): Update manual.
* etc/NEWS: Announce the changes.
* test/lisp/emacs-lisp/map-tests.el (test-map-put-testfn-alist)
(test-map-elt-testfn): New tests.

7 years agoFix `tramp-test39-unload'
Michael Albinus [Mon, 17 Jul 2017 12:12:20 +0000 (14:12 +0200)]
Fix `tramp-test39-unload'

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case-p)
(tramp--test-instrument-test-case): Rename.  Adapt all callees.
(tramp-test36-asynchronous-requests): Bind `timer-max-repeats'.
(tramp-test39-unload): Expect it to pass.  Ignore buffer-local
variables and autoload functions; they are not removed.  Check
also for `-function(s)'.

7 years agoPreserve point under 'dired-auto-revert-buffer' (second case)
Stephen Berman [Mon, 17 Jul 2017 09:09:07 +0000 (11:09 +0200)]
Preserve point under 'dired-auto-revert-buffer' (second case)

* lisp/dired.el (dired): Use pop-to-buffer-same-window instead
of switch-to-buffer.  This preserves Dired window point when
dired-auto-revert-buffer is non-nil.  (Bug#27243)

* test/lisp/dired-tests.el (dired-test-bug27243): New test.

7 years agoHave Fgnutls_available_p return Qnil when GNUTLS is undefined
Martin Rudalics [Mon, 17 Jul 2017 07:00:55 +0000 (09:00 +0200)]
Have Fgnutls_available_p return Qnil when GNUTLS is undefined

* src/gnutls.c (Fgnutls_available_p): Return Qnil when GNUTLS is
undefined to allow --with-gnutls=no builds to proceed.

7 years ago* src/gnutls.c: Restore some comments.
Paul Eggert [Mon, 17 Jul 2017 00:27:03 +0000 (17:27 -0700)]
* src/gnutls.c: Restore some comments.

7 years agoUse memset, not bzero
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Use memset, not bzero

* src/ftcrfont.c (ftcrfont_glyph_extents): Use memset instead
of the (less-portable) bzero.

7 years agoUse explicit_bzero to clear GnuTLS keys
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Use explicit_bzero to clear GnuTLS keys

* admin/merge-gnulib (GNULIB_MODULES): Add explicit_bzero.
* lib/explicit_bzero.c, m4/explicit_bzero.m4: New files.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/gnutls.c (clear_storage): New function.
(gnutls_symmetric_aead): Use it instead of memset.

7 years agoMerge from gnulib
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Merge from gnulib

This incorporates:
2017-07-16 explicit_bzero: new module
2017-07-15 getdtablesize: Add minimal support for OpenVMS.
* lib/getdtablesize.c, lib/string.in.h, m4/getdtablesize.m4:
* m4/string_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

7 years agoFix vc-src-dir-status-files
Dieter Deyke [Sun, 16 Jul 2017 23:08:30 +0000 (02:08 +0300)]
Fix vc-src-dir-status-files

* lisp/vc/vc-src.el (vc-src-dir-status-files): Fix broken
copy-paste from b1a765b3 (bug#27641).

7 years agoFix mismatched parens
Wilfred Hughes [Sun, 16 Jul 2017 17:32:25 +0000 (18:32 +0100)]
Fix mismatched parens

* etc/NEWS.21: Remove excess parenthesis in code example

7 years agoAdd missing declare-function for new function
Alan Third [Sun, 16 Jul 2017 09:49:47 +0000 (10:49 +0100)]
Add missing declare-function for new function

* lisp/frame.el: Add declare function for
ns-mouse-absolute-pixel-position.

7 years agoRealgud for tango themes
R. Bernstein [Sun, 16 Jul 2017 07:51:28 +0000 (03:51 -0400)]
Realgud for tango themes

7 years agoFix test when running from test/lisp/subr-tests.elc
Noam Postavsky [Sat, 15 Jul 2017 16:12:17 +0000 (12:12 -0400)]
Fix test when running from test/lisp/subr-tests.elc

* test/lisp/subr-tests.el (subr-test-backtrace-simple-tests): Don't
assume a lambda expression will be `equal' to its quoted form.  That's
not true if the lambda expression has been compiled.

7 years agoFix some frame handling issues on NS
Alan Third [Sat, 15 Jul 2017 20:57:18 +0000 (21:57 +0100)]
Fix some frame handling issues on NS

* lisp/frame.el (mouse-absolute-pixel-position): Use new NS function.
* src/nsfns.m (Sns_mouse_absolute_pixel_position): New function.
* src/nsterm.m (x_make_frame_visible): Re-establish parent-child
relationship if it's broken.

7 years agols-lisp: Fix file size format
Tino Calancha [Sat, 15 Jul 2017 15:30:56 +0000 (00:30 +0900)]
ls-lisp: Fix file size format

* lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
(ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
* test/lisp/dired-tests.el (dired-test-bug27693): Add test.

7 years agoAvoid link errors with older versions of GnuTLS
Eli Zaretskii [Sat, 15 Jul 2017 13:54:12 +0000 (16:54 +0300)]
Avoid link errors with older versions of GnuTLS

* src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
(Fgnutls_macs, Fgnutls_digests): Conditionally compile code that
calls GnuTLS functions which might be unavailable in older
versions of GnuTLS.

7 years agoImprove comments in faces.el
Eli Zaretskii [Sat, 15 Jul 2017 12:34:03 +0000 (15:34 +0300)]
Improve comments in faces.el

* lisp/faces.el (face-font-family-alternatives): Improve
commentary.

7 years agoImprove some GnuTL error messages
Eli Zaretskii [Sat, 15 Jul 2017 11:41:44 +0000 (14:41 +0300)]
Improve some GnuTL error messages

* src/gnutls.c (gnutls_symmetric_aead, gnutls_symmetric):
* src/fns.c (Fsecure_hash_algorithms): Fix error messages.

7 years agoFix the Elisp manual wrt GnuTL cryptography
Eli Zaretskii [Sat, 15 Jul 2017 11:28:43 +0000 (14:28 +0300)]
Fix the Elisp manual wrt GnuTL cryptography

* doc/lispref/elisp.texi (Top): Update the master menu.
* doc/lispref/text.texi (GnuTLS Cryptography): Add a @menu, to
avoid errors in makeinfo.

7 years agoFix compilation of gnutls.c with older GnuTLS
Eli Zaretskii [Sat, 15 Jul 2017 11:03:44 +0000 (14:03 +0300)]
Fix compilation of gnutls.c with older GnuTLS

* src/gnutrls.c (syms_of_gnutls): Condition some defsubr's
on HAVE_GNUTLS3, to avoid compilation errors when GnuTLS
v3.X is not available.  Reported by Colin Baxter <m43cap@yandex.com>.

7 years agoRealgud for two more light themes
rocky [Sat, 15 Jul 2017 09:23:43 +0000 (05:23 -0400)]
Realgud for two more light themes

7 years agoRearrange MS-Windows code that dynamically loads GnuTLS functions
Eli Zaretskii [Sat, 15 Jul 2017 08:33:22 +0000 (11:33 +0300)]
Rearrange MS-Windows code that dynamically loads GnuTLS functions

* src/gnutls.c [WINDOWSNT]: Reorganize definitions and loading
of functions using the same preprocessing directives as in the code.

7 years agoFix the MS-Windows build broken in gnutls.c
Eli Zaretskii [Sat, 15 Jul 2017 07:43:38 +0000 (10:43 +0300)]
Fix the MS-Windows build broken in gnutls.c

* src/gnutls.c (Fgnutls_available_p) [WINDOWSNT]: Move the DLL
loading code to after 'capabilities' has been calculated.  Remove
redundant comments.

7 years agosrc/image.c (compute_image_size): Remove superfluous checks.
Lars Ingebrigtsen [Sat, 15 Jul 2017 01:21:07 +0000 (03:21 +0200)]
src/image.c (compute_image_size): Remove superfluous checks.

* src/image.c (compute_image_size): Remove superfluous checks.

7 years agoMake combinations of :width/:max-height image specs work reliably
Lars Ingebrigtsen [Sat, 15 Jul 2017 00:45:19 +0000 (02:45 +0200)]
Make combinations of :width/:max-height image specs work reliably

* doc/lispref/display.texi (ImageMagick Images): Document
:width/:max-height combinations (etc) (bug #25583).

* src/image.c (compute_image_size): Handle :width/:max-height
(etc) combinations consistently (by letting "max" win and
preserve ratio).

* test/manual/image-size-tests.el (image-size-tests): Add
tests for :width/:max-height (etc) combinations.

7 years agoFix recent theme changes
Glenn Morris [Fri, 14 Jul 2017 23:46:44 +0000 (19:46 -0400)]
Fix recent theme changes

* etc/themes/manoj-dark-theme.el, etc/themes/tsdh-dark-theme.el:
Fix typos in recent changes.

7 years agoGnuTLS integer-overflow and style fixes
Paul Eggert [Fri, 14 Jul 2017 23:18:37 +0000 (16:18 -0700)]
GnuTLS integer-overflow and style fixes

This tweaks the recently-added GnuTLS improvements so that
they avoid some integer-overflow problems and follow typical
Emacs style a bit better.
* configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
(HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the
configure-time results are displayed.
* src/fns.c (extract_data_from_object): Return char *, not char
const *, since one gnutls caller wants a non-const pointer.  Use
CONSP rather than !NILP when testing for conses.  Use CAR_SAFE
instead of rolling our own code.  Prefer signed types to unsigned
when either will do.  Report problems for lengths out of range,
instead of silently mishandling them.
* src/gnutls.c (emacs_gnutls_strerror): New function, to simplify
callers.  All callers of gnutls_sterror changed.
(Fgnutls_boot): Check for integers out of range rather than
silently truncating them.
(gnutls_symmetric_aead): Check for integer overflow in size
calculations.
(gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests):
Prefer signed to unsigned integers where either will do.
(gnutls_symmetric_aead, gnutls_symmetric):
Work even if ptrdiff_t is wider than ‘long’.
(gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest):
Check for integer overflow in algorithm selection.

7 years ago* .gitlab-ci.yml: Don't install a C++ compiler. Suppress apt interaction.
Noam Postavsky [Sun, 4 Jun 2017 03:57:26 +0000 (23:57 -0400)]
* .gitlab-ci.yml: Don't install a C++ compiler.  Suppress apt interaction.

7 years agoFix the MS-Windows build due to added GnuTLS functions
Eli Zaretskii [Fri, 14 Jul 2017 19:00:55 +0000 (22:00 +0300)]
Fix the MS-Windows build due to added GnuTLS functions

* src/gnutls.c [WINDOWSNT]: Add DEF_DLL_FN for new functions.
(init_gnutls_functions) [WINDOWSNT]: Add LOAD_DLL_FN for new
functions.  Add #define redirections for new functions.
(gnutls_symmetric_aead): Fix format specs to be more portable when
printing ptrdiff_t arguments.
* src/fns.c (gnutls_rnd) [WINDOWSNT]: Redirect to w32_gnutls_rnd
wrapper.
* src/gnutls.h [WINDOWSNT]: Add prototype for w32_gnutls_rnd.

* test/lisp/net/gnutls-tests.el (gnutls-tests-tested-macs)
(gnutls-tests-tested-digests, gnutls-tests-tested-ciphers): Call
gnutls-available-p, otherwise GnuTLS functions might not be loaded
from the DLL on MS-Windows.

7 years ago; Standardize license notices in new files
Glenn Morris [Fri, 14 Jul 2017 17:26:04 +0000 (10:26 -0700)]
; Standardize license notices in new files

7 years ago* lisp/emacs-lisp/bytecomp.el: Fix bug#14860.
Stefan Monnier [Fri, 14 Jul 2017 15:27:21 +0000 (11:27 -0400)]
* lisp/emacs-lisp/bytecomp.el: Fix bug#14860.

* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature): New fun.
Dig into advice wrappers to find the "real" signature.
(byte-compile-callargs-warn, byte-compile-arglist-warn): Use it.
(byte-compile-arglist-signature): Don't bother with "new-style" arglists,
since bytecode functions are now handled in byte-compile--function-signature.

* lisp/files.el (create-file-buffer, insert-directory):
Remove workaround introduced for (bug#14860).

* lisp/help-fns.el (help-fns--analyse-function): `nadvice` is preloaded.

* lisp/help.el (help-function-arglist):
Dig into advice wrappers to find the "real" signature.

7 years agoGnuTLS HMAC and symmetric cipher support
Ted Zlatanov [Fri, 14 Jul 2017 15:04:19 +0000 (11:04 -0400)]
GnuTLS HMAC and symmetric cipher support

    * etc/NEWS: Add news for new feature.

    * doc/lispref/text.texi (GnuTLS Cryptography): Add
    documentation.

    * configure.ac: Add macros HAVE_GNUTLS3_DIGEST,
    HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_AEAD, HAVE_GNUTLS3_HMAC.

    * src/fns.c (Fsecure_hash_algorithms): Add function to list
    supported `secure-hash' algorithms.
    (extract_data_from_object): Add data extraction function that
    can operate on buffers and strings.
    (secure_hash): Use it.
    (Fsecure_hash): Mention `secure-hash-algorithms'.

    * src/gnutls.h: Include gnutls/crypto.h.

    * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
    (gnutls_symmetric, Fgnutls_symmetric_encrypt, Fgnutls_symmetric_decrypt)
    (Fgnutls_macs, Fgnutls_digests, Fgnutls_hash_mac, Fgnutls_hash_digest)
    (Fgnutls_available_p): Implement GnuTLS cryptographic integration.

    * test/lisp/net/gnutls-tests.el: Add tests.

7 years ago* lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well
Stefan Monnier [Fri, 14 Jul 2017 14:29:10 +0000 (10:29 -0400)]
* lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well

It's also defined in cl-extra.el.

7 years agoDo not convert ij and IJ to compatibility chars
Paul Eggert [Fri, 14 Jul 2017 13:19:39 +0000 (06:19 -0700)]
Do not convert ij and IJ to compatibility chars

* lisp/leim/quail/latin-alt.el: Omit lines for ij and IJ in Dutch.
Problem reported by James Cloos (Bug#518#10).

7 years agoRemove Turkish ligatures from Dutch input method
Toon Claes [Fri, 14 Jul 2017 12:53:14 +0000 (05:53 -0700)]
Remove Turkish ligatures from Dutch input method

* lisp/leim/quail/latin-alt.el: Remove Turkish ligatures (Bug#518).

7 years agoImprove stack-overflow heuristic on GNU/Linux
Paul Eggert [Fri, 14 Jul 2017 11:54:05 +0000 (04:54 -0700)]
Improve stack-overflow heuristic on GNU/Linux

Problem reported by Steve Kemp (Bug#27585).
* src/eval.c (near_C_stack_top): Remove.  All uses replaced
by current_thread->stack_top.
(record_in_backtrace): Set current_thread->stack_top.
This is for when the Lisp interpreter calls itself.
* src/lread.c (read1): Set current_thread->stack_top.
This is for recursive s-expression reads.
* src/print.c (print_object): Set current_thread->stack_top.
This is for recursive s-expression printing.
* src/thread.c (mark_one_thread): Get stack top first.
* src/thread.h (struct thread_state.stack_top): Now void *, not char *.

7 years agoRemove duplicate cl--random-state definition
Paul Eggert [Fri, 14 Jul 2017 09:47:30 +0000 (02:47 -0700)]
Remove duplicate cl--random-state definition

* lisp/emacs-lisp/cl-lib.el (cl--random-state): Remove.
This variable is now defined in cl-extra.el (Bug#27617).

7 years agoAdjust timer in tramp-test36-asynchronous-requests
Michael Albinus [Fri, 14 Jul 2017 08:55:31 +0000 (10:55 +0200)]
Adjust timer in tramp-test36-asynchronous-requests

* test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
Adjust timer if it takes too much time.

7 years agoAlways display rmail progress report under user control
Eli Zaretskii [Fri, 14 Jul 2017 08:39:25 +0000 (11:39 +0300)]
Always display rmail progress report under user control

* lisp/mail/rmail.el (rmail-show-message-1): Delete the second
copy of '(message "Showing message %d..." msg)'.  (Bug#27535)

7 years agoAvoid byte-compilation warnings for advised functions
Eli Zaretskii [Fri, 14 Jul 2017 08:33:46 +0000 (11:33 +0300)]
Avoid byte-compilation warnings for advised functions

* lisp/files.el (insert-directory, create-file-buffer): Add an
advertised-calling-convention form to shut up byte-compilation
warnings.  (Bug#14860)

7 years agoAdd assertion related to display-line-numbers
Eli Zaretskii [Fri, 14 Jul 2017 08:00:25 +0000 (11:00 +0300)]
Add assertion related to display-line-numbers

* src/xdisp.c (maybe_produce_line_number): Add assertion for the
condition regarding IT->glyph_row->used[TEXT_AREA] expected by the
code.  (Bug#27668)

7 years agoPrevent display corruption when display-line-numbers is set
Eli Zaretskii [Fri, 14 Jul 2017 07:53:36 +0000 (10:53 +0300)]
Prevent display corruption when display-line-numbers is set

* src/xdisp.c (try_window_reusing_current_matrix): If giving up
due to display-line-numbers, clear the window's desired glyph
matrix before returning, as the following call to try_window will
call display_line, which expects rows of the desired matrix
cleared.  (Bug#27668)

7 years agoRevert "Use fixed-pitch font for display-line-numbers"
Eli Zaretskii [Fri, 14 Jul 2017 06:24:44 +0000 (09:24 +0300)]
Revert "Use fixed-pitch font for display-line-numbers"

This reverts commit d014a5e15c1110af77e7a96f06ccd0f0cafb099f.
* lisp/faces.el (line-number): Don't use a fixed-pitch font, by
popular demand.  For relevant discussions, see

 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00433.html
 http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00445.html

7 years agoMerge from gnulib
Paul Eggert [Fri, 14 Jul 2017 02:24:06 +0000 (19:24 -0700)]
Merge from gnulib

This incorporates:
2017-07-13 Improve cross-compilation guesses for native Windows
2017-07-11 More systematic m4 quoting and indentation
2017-07-10 Make sure $host and $host_os are defined when used
2017-07-03 stdioext: Port to OpenVMS
2017-06-24 xalloc-oversized: port to icc
* doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
* lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
* m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
* m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
Copy from Gnulib.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche [Thu, 13 Jul 2017 21:25:34 +0000 (23:25 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoC++ Mode. Fix anomaly occurring when a ">" is deleted then reinserted.
Alan Mackenzie [Thu, 13 Jul 2017 19:56:00 +0000 (19:56 +0000)]
C++ Mode.  Fix anomaly occurring when a ">" is deleted then reinserted.

This fontification anomaly happened because after deleting the ">",
c-forward-<>-arglist parses the preceding identifier as a putative type but
stores it in c-found-types before it becomes clear it is not an unambiguous
type.  c-forward-<>-arglist fails, leaving the spurious type id in
c-found-types.  Fix this by "binding" c-found-types "to itself" in
c-forward-<>-arglist, and restoring the original value when that function call
fails.

* lisp/progmodes/cc-engine.el (c-copy-found-types): New function.
(c-forward-<>-arglist): Record the original value of c-found-types at the
beginning of the function, and restore it at the end on failure.

* lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens): Rewrite more
accurately.

7 years agoAdd tests for SES, and fix one more cell renaming bug.
Vincent Belaïche [Thu, 13 Jul 2017 18:58:22 +0000 (20:58 +0200)]
Add tests for SES, and fix one more cell renaming bug.

* lisp/ses.el (ses-relocate-all): In case of insertion, do not
relocate value for named cells as they keep the same symbol.
(ses-rename-cell): Set new cell name symbol to cell value --- do not
rely on recalculating.  Push cells with updated data --- cell name,
cell reference list, or cell formula --- to deferred write list.

* test/lisp/ses-tests.el: New file, with 7 tests for SES.

7 years ago; Improve tramp-tests traces
Michael Albinus [Thu, 13 Jul 2017 14:40:07 +0000 (16:40 +0200)]
; Improve tramp-tests traces

7 years agoFix some bugs in c-defun-name. This fixes bug #25623.
Alan Mackenzie [Wed, 12 Jul 2017 20:15:56 +0000 (20:15 +0000)]
Fix some bugs in c-defun-name.  This fixes bug #25623.

* lisp/progmodes/cc-cmds.el (c-defun-name): Fix some bugs to do with structs,
etc.

7 years agoMake prog-mode-map the parent of c-mode-base-map. Fixes bug #26658.
Vasilij Schneidermann [Wed, 12 Jul 2017 17:42:12 +0000 (17:42 +0000)]
Make prog-mode-map the parent of c-mode-base-map.  Fixes bug #26658.

* lisp/progmodes/cc-mode.el (top level): Make prog-mode-map the parent of
c-mode-base-map if possible.

7 years agoCC Mode: create and use c-set-keymap-parent.
Alan Mackenzie [Wed, 12 Jul 2017 17:03:35 +0000 (17:03 +0000)]
CC Mode: create and use c-set-keymap-parent.

* lisp/progmodes/cc-defs.el (c-set-keymap-parent): New macro.

* lisp/progmodes/cc-mode.el (top-level): Remove cc-bytecomp-defun for
set-keymap-parents.
(c-make-inherited-keymap): Use c-set-keymap-parent in place of inline code.

7 years agoMinor tweaks of new line number display variables
Martin Rudalics [Wed, 12 Jul 2017 15:35:31 +0000 (17:35 +0200)]
Minor tweaks of new line number display variables

* src/xdisp.c (Vdisplay_line_numbers): Tweak doc-string.
(Vdisplay_line_number_width): Rename to
Vdisplay_line_numbers_width.
(maybe_produce_line_number): Comply with above rename.
* lisp/cus-start.el (standard):
* lisp/frame.el (top-level):
* etc/NEWS: Comply with renaming of
`display-line-number-width' to `display-line-numbers-width'.

7 years agoAvoid assertion violations in close_infile_unwind
Eli Zaretskii [Wed, 12 Jul 2017 14:49:21 +0000 (17:49 +0300)]
Avoid assertion violations in close_infile_unwind

* src/lread.c (close_infile_unwind): A temporary band-aid solution
for bug#27642: allow 'infile' be NULL.

7 years ago; Enable traces for tramp-tests.el on hydra
Michael Albinus [Wed, 12 Jul 2017 12:53:53 +0000 (14:53 +0200)]
; Enable traces for tramp-tests.el on hydra

7 years agoUse fixed-pitch font for display-line-numbers
Eli Zaretskii [Tue, 11 Jul 2017 15:16:36 +0000 (18:16 +0300)]
Use fixed-pitch font for display-line-numbers

* lisp/faces.el (line-number): Use a fixed-pitch font by default,
even if the default face uses a variable-pitch font.  Reported by
James Cloos <cloos@jhcloos.com>.

7 years ago; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Copyedits.
Eli Zaretskii [Tue, 11 Jul 2017 15:11:33 +0000 (18:11 +0300)]
; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Copyedits.

7 years agoImprove documentation of display-line-numbers
Eli Zaretskii [Tue, 11 Jul 2017 15:08:46 +0000 (18:08 +0300)]
Improve documentation of display-line-numbers

* src/xdisp.c (syms_of_xdisp) <display-line-numbers>: Improve the
doc string.  Suggested by Alex <agrambot@gmail.com>.

7 years agoAdd an optional testfn parameter to assoc
Nicolas Petton [Fri, 7 Jul 2017 19:21:55 +0000 (21:21 +0200)]
Add an optional testfn parameter to assoc

* src/fns.c (assoc): New optional testfn parameter used for comparison
when provided.
* test/src/fns-tests.el (test-assoc-testfn): Add tests for the new
'testfn' parameter.
* src/buffer.c:
* src/coding.c:
* src/dbusbind.c:
* src/font.c:
* src/fontset.c:
* src/gfilenotify.c:
* src/image.c:
* src/keymap.c:
* src/process.c:
* src/w32fns.c:
* src/w32font.c:
* src/w32notify.c:
* src/w32term.c:
* src/xdisp.c:
* src/xfont.c: Add a third argument to Fassoc calls.
* etc/NEWS:
* doc/lispref/lists.texi: Document the new 'testfn' parameter.

7 years agoUse `with-demoted-errors' in Tramp
Michael Albinus [Mon, 10 Jul 2017 15:49:01 +0000 (17:49 +0200)]
Use `with-demoted-errors' in Tramp

* lisp/net/tramp.el (tramp-with-demoted-errors): New defmacro.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Use it.

7 years agoAdd Quick Start Guide to Tramp manual
Michael Albinus [Mon, 10 Jul 2017 13:36:23 +0000 (15:36 +0200)]
Add Quick Start Guide to Tramp manual

* doc/misc/tramp.texi: Use consequently "@value{tramp}" and
"MS Windows".
(Quick Start Guide): New node.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.3-pre".

7 years agoFix failing module tests on GNU/Linux
Glenn Morris [Sun, 9 Jul 2017 23:43:09 +0000 (16:43 -0700)]
Fix failing module tests on GNU/Linux

* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object)
(module--test-assertions--call-emacs-from-gc):
Avoid test failures due to backtraces.

7 years agoFix core dump in substitute-object-in-subtree
Paul Eggert [Sun, 9 Jul 2017 23:04:02 +0000 (16:04 -0700)]
Fix core dump in substitute-object-in-subtree

Without this fix, (substitute-object-in-subtree #0=(#0# 'a) 'a)
would dump core, since the C code would recurse indefinitely through
the infinite structure.  This patch adds an argument to the function,
and renames it to lread--substitute-object-in-subtree as the function
is not general-purpose and should not be relied on by outside code.
See Bug#23660.
* src/intervals.c (traverse_intervals_noorder): ARG is now void *,
not Lisp_Object, so that callers need not cons unnecessarily.
All callers changed.  Also, remove related #if-0 code that was
“temporary” in the early 1990s and has not been compilable for
some time.
* src/lread.c (struct subst): New type, for substitution closure data.
(seen_list): Remove this static var, as this info is now part of
struct subst.  All uses removed.
(Flread__substitute_object_in_subtree): Rename from
Fsubstitute_object_in_subtree, and give it a 3rd arg so that it
doesn’t dump core when called from the top level with an
already-cyclic structure.  All callers changed.
(SUBSTITUTE): Remove.  All callers expanded and then simplified.
(substitute_object_recurse): Take a single argument SUBST rather
than a pair OBJECT and PLACEHOLDER, so that its address can be
passed around as part of a closure; this avoids the need for an
AUTO_CONS call.  All callers changed.  If the COMPLETED component
is t, treat every subobject as potentially circular.
(substitute_in_interval): Take a struct subst * rather than a
Lisp_Object, for the closure data.  All callers changed.
* test/src/lread-tests.el (lread-lread--substitute-object-in-subtree):
New test, to check that the core dump does not reoccur.

7 years agoMinor simplification of module_free_global_ref
Philipp Stephani [Sun, 9 Jul 2017 22:33:30 +0000 (00:33 +0200)]
Minor simplification of module_free_global_ref

* src/emacs-module.c (module_free_global_ref): Remove unused variable
'hashcode'.  Inline variable 'value' that's only used once.

7 years agoRe-add a useful assertion
Philipp Stephani [Sun, 9 Jul 2017 22:28:50 +0000 (00:28 +0200)]
Re-add a useful assertion

* src/emacs-module.c (module_free_global_ref): Re-add assertion that
the reference count is zero.  This assertion was removed in commit
8afaa1321f8088bfb877fe4b6676e8517adb0bb7, but it's not included in the
test performed by XFASTINT before, because the previous reference
count could have been zero already in the case of a buggy
implementation.  This assertion might have detected Bug#27587.

7 years agoFix bug in module_free_global_ref (Bug#27587)
Valentin Gatien-Baron [Sun, 9 Jul 2017 22:08:52 +0000 (00:08 +0200)]
Fix bug in module_free_global_ref (Bug#27587)

* src/emacs-module.c (module_free_global_ref): Actually remove entry
from hash table.

Copyright-paperwork-exempt: yes

7 years agoFurther improve electric quote support for Markdown (Bug#24709)
Philipp Stephani [Sun, 2 Jul 2017 16:14:21 +0000 (18:14 +0200)]
Further improve electric quote support for Markdown (Bug#24709)

Markdown sets both 'comment-start' and 'comment-use-syntax' to non-nil
values.  Therefore 'electric-quote-mode' recognized it as a
programming mode.  Fix this by first checking whether the current
major mode is derived from 'text-mode'.

* lisp/electric.el (electric-quote-post-self-insert-function): Treat
'text-mode' as stronger signal than comment syntax.

* test/lisp/electric-tests.el (electric-quote-markdown-in-text)
(electric-quote-markdown-in-code): Adapt unit tests.

7 years agoRemove pointless code in 'electric-quote-mode'
Philipp Stephani [Sun, 2 Jul 2017 16:04:38 +0000 (18:04 +0200)]
Remove pointless code in 'electric-quote-mode'

* lisp/electric.el (electric-quote-post-self-insert-function): Remove
pointless form.

7 years agoRefactor 'electric-quote-mode'
Philipp Stephani [Sun, 2 Jul 2017 16:03:06 +0000 (18:03 +0200)]
Refactor 'electric-quote-mode'

* lisp/electric.el (electric-quote-post-self-insert-function): Remove
local variable 'start', which was misnamed and only used once.

7 years agoAvoid crashes on MS-Windows starting 64-bit .NET executables
Saulius Menkevičius [Sun, 9 Jul 2017 18:16:17 +0000 (21:16 +0300)]
Avoid crashes on MS-Windows starting 64-bit .NET executables

* src/w32proc.c (w32_executable_type): Don't assume that the
import directory in a DLL will always be non-NULL.  (Bug#27527)

Copyright-paperwork-exempt: yes

7 years agoAvoid compilation warning in files.el
Eli Zaretskii [Sun, 9 Jul 2017 17:35:57 +0000 (20:35 +0300)]
Avoid compilation warning in files.el

* lisp/files.el (auto-save-visited-file-name): Avoid obsoletion
warning due to its use in auto-save-visited-mode.

7 years agoImprove indexing of VC-related stuff in the Emacs manual
Eli Zaretskii [Sun, 9 Jul 2017 14:46:59 +0000 (17:46 +0300)]
Improve indexing of VC-related stuff in the Emacs manual

* doc/emacs/maintaining.texi (Version Control): Add a "VC" index
entry.  (Bug#27627)

7 years ago; * etc/NEWS: Fix a typo.
Eli Zaretskii [Sun, 9 Jul 2017 14:42:16 +0000 (17:42 +0300)]
; * etc/NEWS: Fix a typo.

7 years agoSpeed up display of line numbers for very large buffers
Eli Zaretskii [Sun, 9 Jul 2017 14:37:23 +0000 (17:37 +0300)]
Speed up display of line numbers for very large buffers

* src/xdisp.c (maybe_produce_line_number): Speed up line counting
using values cached by mode-line display of line numbers.
(Bug#27622)

7 years ago; * src/emacs-module.c (module_assert_thread): Simplify.
Philipp Stephani [Sun, 9 Jul 2017 11:43:45 +0000 (13:43 +0200)]
; * src/emacs-module.c (module_assert_thread): Simplify.

7 years agoDefine internal_border_parts for window systems only (Bug#27615)
Alexander Kuleshov [Sun, 9 Jul 2017 07:11:57 +0000 (09:11 +0200)]
Define internal_border_parts for window systems only (Bug#27615)

* src/keyboard.c: (internal_border_parts): Define only
when HAVE_WINDOW_SYSTEM is enabled.  (Bug#27615)

7 years agoAdd realgud faces faces to whiteboard...
R. Bernstein [Sun, 9 Jul 2017 01:57:33 +0000 (21:57 -0400)]
Add realgud faces faces to whiteboard...

Adjust wheatgrass to use underline for enabled/disabled breakpoints

7 years ago; Merge: Update and optimize UCS normalization tests
Noam Postavsky [Sat, 8 Jul 2017 18:32:07 +0000 (14:32 -0400)]
; Merge: Update and optimize UCS normalization tests

7 years agoOptimize UCS normalization tests
Noam Postavsky [Sat, 8 Jul 2017 17:20:17 +0000 (13:20 -0400)]
Optimize UCS normalization tests

Brings the the time for `ucs-normalize-part1' from 200s down to 130s.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--parse-column): Use character instead of string
of length 1 for terminator.  Convert return value into string since
all callers need that form anyway.
(ucs-normalize-tests--normalization-equal-p): Rename from
ucs-normalize-tests--normalize.  Use dedicated buffer instead of
messing with narrowing.  Take string to compare against and insert it
into buffer so that compare-buffer-substrings can be used instead of
allocating a new string from buffer contents.
(ucs-normalize-tests--normalization-chareq-p): New macro, specialized
for comparing single character.
(ucs-normalize-tests--rule1-holds-p)
(ucs-normalize-tests--rule2-holds-p): Turn into defsubst.
(ucs-normalize-tests--rule1-failing-for-partX): Use `eq' instead of
`='.

7 years agoUpdate failing lines for UCS normalize tests
Noam Postavsky [Sat, 8 Jul 2017 17:06:48 +0000 (13:06 -0400)]
Update failing lines for UCS normalize tests

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part2): Update for new
admin/unidata/NormalizationTest.txt version.

7 years agoSemi-automate the procedure for updating UCS normalize test bad lines
Noam Postavsky [Sat, 8 Jul 2017 17:01:30 +0000 (13:01 -0400)]
Semi-automate the procedure for updating UCS normalize test bad lines

* test/lisp/international/ucs-normalize-tests.el: Remove incorrect
commentary describing a manual procedure for producing the updated
failing lines, it did not actually work.  Replace it with pointer to
new function which prints the updated values.
(ucs-normalize-tests--rule1-holds-p): Renamed from
ucs-normalize-tests--invariants-hold-p.
(ucs-normalize-tests--rule2-holds-p): Renamed from
ucs-normalize-tests--invariants-rule2-hold-p.
(ucs-normalize-tests--rule1-failing-for-partX): Renamed from
ucs-normalize-tests--invariants-failing-for-part.
(ucs-normalize-tests--rule1-failing-for-lines): Renamed from
ucs-normalize-tests--invariants-failing-for-lines.
(ucs-normalize-tests--part2-rule1-failed-lines): New variable.
(ucs-normalize-part2): Set it.
(ucs-normalize-part1): Always run through to end of test before
checking for failures.
(ucs-normalize-tests--insert-failing-lines)
(ucs-normalize-check-failing-lines): New functions, used to update
the *--failing-lines-part* variables.

7 years ago* lisp/cus-start.el (standard): Spelling fix.
Paul Eggert [Sat, 8 Jul 2017 15:42:09 +0000 (08:42 -0700)]
* lisp/cus-start.el (standard): Spelling fix.

7 years agoModule assertions: check for garbage collections
Philipp Stephani [Tue, 4 Jul 2017 20:50:46 +0000 (22:50 +0200)]
Module assertions: check for garbage collections

It's technically possible to write a user pointer finalizer that calls
into Emacs module functions.  This would be disastrous because it
would allow arbitrary Lisp code to run during garbage collection.
Therefore extend the module assertions to check for this case.

* src/emacs-module.c (module_assert_thread): Also check whether a
garbage collection is in progress.

* test/data/emacs-module/mod-test.c (invalid_finalizer)
(Fmod_test_invalid_finalizer): New test module functions.
(emacs_module_init): Register new test function.

* test/src/emacs-module-tests.el (module--test-assertion)
(module--with-temp-directory): New helper macros.
(module--test-assertions--load-non-live-object): Rename existing
unit test, use helper macros.
(module--test-assertions--call-emacs-from-gc): New unit test.

7 years agoCapitalize the menu entry for display-line-numbers
Eli Zaretskii [Sat, 8 Jul 2017 10:22:53 +0000 (13:22 +0300)]
Capitalize the menu entry for display-line-numbers

* lisp/menu-bar.el (menu-bar-showhide-menu): Capitalize menu item
for display-line-numbers.  Suggested by Martin Rudalics
<rudalics@gmx.at>.

7 years agoUpdate Unicode data and files to Unicode 10.0
Eli Zaretskii [Sat, 8 Jul 2017 10:02:47 +0000 (13:02 +0300)]
Update Unicode data and files to Unicode 10.0

* admin/notes/unicode:
* admin/unidata/README:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/IVD_Sequences.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* lisp/international/characters.el:
* lisp/international/fontset.el (script-representative-chars):
* lisp/international/mule-cmds.el (ucs-names): Update per Unicode 10.0.