1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00
Commit graph

129878 commits

Author SHA1 Message Date
Michael Albinus
4968aa685b 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)'.
2017-07-17 14:12:20 +02:00
Stephen Berman
b2150e0b02 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.
2017-07-17 11:09:07 +02:00
Martin Rudalics
b707231833 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.
2017-07-17 09:00:55 +02:00
Paul Eggert
8250a20f9d * src/gnutls.c: Restore some comments. 2017-07-16 17:27:30 -07:00
Paul Eggert
b740b02d23 Use memset, not bzero
* src/ftcrfont.c (ftcrfont_glyph_extents): Use memset instead
of the (less-portable) bzero.
2017-07-16 16:29:12 -07:00
Paul Eggert
59f6972134 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.
2017-07-16 16:29:12 -07:00
Paul Eggert
252444aaa3 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.
2017-07-16 16:29:11 -07:00
Dieter Deyke
7463636591 Fix vc-src-dir-status-files
* lisp/vc/vc-src.el (vc-src-dir-status-files): Fix broken
copy-paste from b1a765b3 (bug#27641).
2017-07-17 02:11:14 +03:00
Wilfred Hughes
56da7add78 Fix mismatched parens
* etc/NEWS.21: Remove excess parenthesis in code example
2017-07-16 18:32:25 +01:00
Alan Third
45892db6f5 Add missing declare-function for new function
* lisp/frame.el: Add declare function for
ns-mouse-absolute-pixel-position.
2017-07-16 10:52:34 +01:00
R. Bernstein
7942679e3a Realgud for tango themes 2017-07-16 03:51:28 -04:00
Noam Postavsky
7a0fb00819 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.
2017-07-15 21:55:29 -04:00
Alan Third
30444c695a 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.
2017-07-15 22:12:33 +01:00
Tino Calancha
66683f46b8 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.
2017-07-16 00:30:56 +09:00
Eli Zaretskii
b30ee0c922 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.
2017-07-15 16:54:12 +03:00
Eli Zaretskii
a5c4ffdb6e Improve comments in faces.el
* lisp/faces.el (face-font-family-alternatives): Improve
commentary.
2017-07-15 15:34:03 +03:00
Eli Zaretskii
cc78d5339c Improve some GnuTL error messages
* src/gnutls.c (gnutls_symmetric_aead, gnutls_symmetric):
* src/fns.c (Fsecure_hash_algorithms): Fix error messages.
2017-07-15 14:41:44 +03:00
Eli Zaretskii
1f161104ce 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.
2017-07-15 14:28:43 +03:00
Eli Zaretskii
178e0df2c2 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>.
2017-07-15 14:03:44 +03:00
rocky
011dfceae3 Realgud for two more light themes 2017-07-15 05:23:43 -04:00
Eli Zaretskii
d23f38e31d 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.
2017-07-15 11:33:22 +03:00
Eli Zaretskii
55d65682ab 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.
2017-07-15 10:43:38 +03:00
Lars Ingebrigtsen
511fe21b88 src/image.c (compute_image_size): Remove superfluous checks.
* src/image.c (compute_image_size): Remove superfluous checks.
2017-07-15 03:21:07 +02:00
Lars Ingebrigtsen
ae56c9674b 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.
2017-07-15 02:48:17 +02:00
Glenn Morris
89c5d59280 Fix recent theme changes
* etc/themes/manoj-dark-theme.el, etc/themes/tsdh-dark-theme.el:
Fix typos in recent changes.
2017-07-14 19:46:44 -04:00
Paul Eggert
05b8b86699 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.
2017-07-14 16:36:18 -07:00
Noam Postavsky
8b64a80a56
* .gitlab-ci.yml: Don't install a C++ compiler. Suppress apt interaction. 2017-07-14 16:13:26 -04:00
Eli Zaretskii
389fb2aebf 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.
2017-07-14 22:00:55 +03:00
Glenn Morris
548941bbd8 ; Standardize license notices in new files 2017-07-14 10:26:04 -07:00
Stefan Monnier
6e2d6d54e1 * 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.
2017-07-14 11:27:21 -04:00
Ted Zlatanov
583995c62d
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.
2017-07-14 11:06:16 -04:00
Stefan Monnier
0f3cc0b824 * lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well
It's also defined in cl-extra.el.
2017-07-14 10:29:10 -04:00
Paul Eggert
1e09f8d379 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).
2017-07-14 06:20:44 -07:00
Toon Claes
3bdf5b2149 Remove Turkish ligatures from Dutch input method
* lisp/leim/quail/latin-alt.el: Remove Turkish ligatures (Bug#518).
2017-07-14 06:00:47 -07:00
Paul Eggert
9dee1c884e 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 *.
2017-07-14 04:57:18 -07:00
Paul Eggert
6443a95ad7 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).
2017-07-14 02:47:48 -07:00
Michael Albinus
05c7c8278e 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.
2017-07-14 10:55:31 +02:00
Eli Zaretskii
4d3657af32 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)
2017-07-14 11:39:25 +03:00
Eli Zaretskii
60d24e1681 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)
2017-07-14 11:33:46 +03:00
Eli Zaretskii
037d8bdfeb 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)
2017-07-14 11:00:25 +03:00
Eli Zaretskii
6fa3176cca 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)
2017-07-14 10:53:36 +03:00
Eli Zaretskii
5c9b6e901c Revert "Use fixed-pitch font for display-line-numbers"
This reverts commit d014a5e15c.
* 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
2017-07-14 09:24:44 +03:00
Paul Eggert
3128d5d10e 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.
2017-07-13 19:24:49 -07:00
Vincent Belaïche
ab87dbad1d Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2017-07-13 23:25:34 +02:00
Alan Mackenzie
7eef16a923 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.
2017-07-13 19:56:00 +00:00
Vincent Belaïche
b048351a0f 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.
2017-07-13 20:58:22 +02:00
Michael Albinus
1f08279e1b ; Improve tramp-tests traces 2017-07-13 16:40:07 +02:00
Alan Mackenzie
dde7f2d48b 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.
2017-07-12 20:15:56 +00:00
Vasilij Schneidermann
7dd72d76ef 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.
2017-07-12 17:42:12 +00:00
Alan Mackenzie
125a8a62db 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.
2017-07-12 17:03:35 +00:00