diff options
| author | Ted Zlatanov | 2014-12-12 19:15:10 -0500 |
|---|---|---|
| committer | Ted Zlatanov | 2014-12-12 19:23:19 -0500 |
| commit | 28e0d0c95d8e17e18e94744e99ccd68c8c911703 (patch) | |
| tree | a45021bd7042b2008cf6084bd4019777b7575492 /src | |
| parent | b81a1837916a7f3f7abd953338302fa237a532f2 (diff) | |
| download | emacs-28e0d0c95d8e17e18e94744e99ccd68c8c911703.tar.gz emacs-28e0d0c95d8e17e18e94744e99ccd68c8c911703.zip | |
Merge from origin/emacs-24
bd6c441 * simple.el (password-word-equivalents): Add "passcode", used for numeric secrets like PINs or RSA tokens.
16d4c1c A better fix for bug#19346
82ec808 * .gitignore: Add !lib/std*.in.h, so as to not ignore the .in.h files.
3cf7629 Git ignore lib/std*.h
301a401 Always define `gnutls-available-p' even if GnuTLS is not available.
d76b9b2 Don't break example string between 2 lines (bug#19257)
75b4857 Port commit-msg to mawk
9ac0332 Improve commit-msg messages and autosquash
0c2f254 Support overflow-newline-into-fringe together with word-wrap (bug#19300)
935ee05 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in order to determine `tramp-own-remote-path'.
c2db939 python.el: Support interpreter paths with spaces
d83f329 ChangeLog fix
0f9fbb9 Port commit-message checking to FreeBSD 9.
3db1ada admin/MAINTAINERS: Update my interests and responsibilities.
6382f24 * .gitignore: Ignore autosave files.
Conflicts:
ChangeLog
lisp/progmodes/python.el
src/gnutls.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/gnutls.c | 55 | ||||
| -rw-r--r-- | src/gnutls.h | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 25 |
5 files changed, 73 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 887ca89261a..fd37eaefbec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2014-12-12 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * gnutls.c (Fgnutls_available_p, syms_of_gnutls): Move | ||
| 4 | gnutls-available-p out of the HAVE_GNUTLS conditional, and define | ||
| 5 | them only once. | ||
| 6 | |||
| 7 | 2014-12-11 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 8 | |||
| 9 | * emacs.c (main): Always include gnutls.h and run syms_of_gnutls. | ||
| 10 | |||
| 11 | * gnutls.h: Always declare syms_of_gnutls. | ||
| 12 | |||
| 13 | * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for | ||
| 14 | clarity. Let the availability check return Qnil when the GnuTLS | ||
| 15 | integration is not available, instead of erroring out. | ||
| 16 | (Bug#19346) | ||
| 17 | |||
| 18 | 2014-12-10 Eli Zaretskii <eliz@gnu.org> | ||
| 19 | |||
| 20 | * xdisp.c (move_it_in_display_line_to, display_line): Don't | ||
| 21 | disallow overflow-newline-into-fringe when word-wrap is in | ||
| 22 | effect. (Bug#19300) | ||
| 23 | |||
| 1 | 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | 24 | 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 25 | ||
| 3 | * fileio.c: Better preserve window-points during revert (bug#19161). | 26 | * fileio.c: Better preserve window-points during revert (bug#19161). |
diff --git a/src/emacs.c b/src/emacs.c index da34eaac14b..b9654d0e03c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -88,9 +88,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 88 | #include "sysselect.h" | 88 | #include "sysselect.h" |
| 89 | #include "systime.h" | 89 | #include "systime.h" |
| 90 | 90 | ||
| 91 | #ifdef HAVE_GNUTLS | ||
| 92 | #include "gnutls.h" | 91 | #include "gnutls.h" |
| 93 | #endif | ||
| 94 | 92 | ||
| 95 | #if (defined PROFILING \ | 93 | #if (defined PROFILING \ |
| 96 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) | 94 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) |
| @@ -1493,9 +1491,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1493 | syms_of_fontset (); | 1491 | syms_of_fontset (); |
| 1494 | #endif /* HAVE_NS */ | 1492 | #endif /* HAVE_NS */ |
| 1495 | 1493 | ||
| 1496 | #ifdef HAVE_GNUTLS | ||
| 1497 | syms_of_gnutls (); | 1494 | syms_of_gnutls (); |
| 1498 | #endif | ||
| 1499 | 1495 | ||
| 1500 | #ifdef HAVE_GFILENOTIFY | 1496 | #ifdef HAVE_GFILENOTIFY |
| 1501 | syms_of_gfilenotify (); | 1497 | syms_of_gfilenotify (); |
diff --git a/src/gnutls.c b/src/gnutls.c index 4de2eaf5b52..4e12d88ab82 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -779,26 +779,6 @@ See also `gnutls-init'. */) | |||
| 779 | return emacs_gnutls_deinit (proc); | 779 | return emacs_gnutls_deinit (proc); |
| 780 | } | 780 | } |
| 781 | 781 | ||
| 782 | DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, | ||
| 783 | doc: /* Return t if GnuTLS is available in this instance of Emacs. */) | ||
| 784 | (void) | ||
| 785 | { | ||
| 786 | #ifdef WINDOWSNT | ||
| 787 | Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache); | ||
| 788 | if (CONSP (found)) | ||
| 789 | return XCDR (found); | ||
| 790 | else | ||
| 791 | { | ||
| 792 | Lisp_Object status; | ||
| 793 | status = init_gnutls_functions () ? Qt : Qnil; | ||
| 794 | Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache); | ||
| 795 | return status; | ||
| 796 | } | ||
| 797 | #else | ||
| 798 | return Qt; | ||
| 799 | #endif | ||
| 800 | } | ||
| 801 | |||
| 802 | static Lisp_Object | 782 | static Lisp_Object |
| 803 | gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix) | 783 | gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix) |
| 804 | { | 784 | { |
| @@ -1101,7 +1081,6 @@ The return value is a property list with top-level keys :warnings and | |||
| 1101 | return result; | 1081 | return result; |
| 1102 | } | 1082 | } |
| 1103 | 1083 | ||
| 1104 | |||
| 1105 | /* Initialize global GnuTLS state to defaults. | 1084 | /* Initialize global GnuTLS state to defaults. |
| 1106 | Call `gnutls-global-deinit' when GnuTLS usage is no longer needed. | 1085 | Call `gnutls-global-deinit' when GnuTLS usage is no longer needed. |
| 1107 | Return zero on success. */ | 1086 | Return zero on success. */ |
| @@ -1602,9 +1581,36 @@ This function may also return `gnutls-e-again', or | |||
| 1602 | return gnutls_make_error (ret); | 1581 | return gnutls_make_error (ret); |
| 1603 | } | 1582 | } |
| 1604 | 1583 | ||
| 1584 | #endif /* HAVE_GNUTLS */ | ||
| 1585 | |||
| 1586 | DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, | ||
| 1587 | doc: /* Return t if GnuTLS is available in this instance of Emacs. */) | ||
| 1588 | (void) | ||
| 1589 | { | ||
| 1590 | #ifdef HAVE_GNUTLS | ||
| 1591 | # ifdef WINDOWSNT | ||
| 1592 | Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache); | ||
| 1593 | if (CONSP (found)) | ||
| 1594 | return XCDR (found); | ||
| 1595 | else | ||
| 1596 | { | ||
| 1597 | Lisp_Object status; | ||
| 1598 | status = init_gnutls_functions () ? Qt : Qnil; | ||
| 1599 | Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache); | ||
| 1600 | return status; | ||
| 1601 | } | ||
| 1602 | # else /* !WINDOWSNT */ | ||
| 1603 | return Qt; | ||
| 1604 | # endif /* !WINDOWSNT */ | ||
| 1605 | #else /* !HAVE_GNUTLS */ | ||
| 1606 | return Qnil; | ||
| 1607 | #endif /* !HAVE_GNUTLS */ | ||
| 1608 | } | ||
| 1609 | |||
| 1605 | void | 1610 | void |
| 1606 | syms_of_gnutls (void) | 1611 | syms_of_gnutls (void) |
| 1607 | { | 1612 | { |
| 1613 | #ifdef HAVE_GNUTLS | ||
| 1608 | gnutls_global_initialized = 0; | 1614 | gnutls_global_initialized = 0; |
| 1609 | 1615 | ||
| 1610 | DEFSYM (Qgnutls_dll, "gnutls"); | 1616 | DEFSYM (Qgnutls_dll, "gnutls"); |
| @@ -1646,7 +1652,6 @@ syms_of_gnutls (void) | |||
| 1646 | defsubr (&Sgnutls_boot); | 1652 | defsubr (&Sgnutls_boot); |
| 1647 | defsubr (&Sgnutls_deinit); | 1653 | defsubr (&Sgnutls_deinit); |
| 1648 | defsubr (&Sgnutls_bye); | 1654 | defsubr (&Sgnutls_bye); |
| 1649 | defsubr (&Sgnutls_available_p); | ||
| 1650 | defsubr (&Sgnutls_peer_status); | 1655 | defsubr (&Sgnutls_peer_status); |
| 1651 | defsubr (&Sgnutls_peer_status_warning_describe); | 1656 | defsubr (&Sgnutls_peer_status_warning_describe); |
| 1652 | 1657 | ||
| @@ -1656,6 +1661,8 @@ Set this larger than 0 to get debug output in the *Messages* buffer. | |||
| 1656 | 1 is for important messages, 2 is for debug data, and higher numbers | 1661 | 1 is for important messages, 2 is for debug data, and higher numbers |
| 1657 | are as per the GnuTLS logging conventions. */); | 1662 | are as per the GnuTLS logging conventions. */); |
| 1658 | global_gnutls_log_level = 0; | 1663 | global_gnutls_log_level = 0; |
| 1659 | } | ||
| 1660 | 1664 | ||
| 1661 | #endif /* HAVE_GNUTLS */ | 1665 | #endif /* HAVE_GNUTLS */ |
| 1666 | |||
| 1667 | defsubr (&Sgnutls_available_p); | ||
| 1668 | } | ||
diff --git a/src/gnutls.h b/src/gnutls.h index 8a667c00568..8a18976cf1b 100644 --- a/src/gnutls.h +++ b/src/gnutls.h | |||
| @@ -82,8 +82,8 @@ extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); | |||
| 82 | #endif | 82 | #endif |
| 83 | extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); | 83 | extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); |
| 84 | 84 | ||
| 85 | extern void syms_of_gnutls (void); | ||
| 86 | |||
| 87 | #endif | 85 | #endif |
| 88 | 86 | ||
| 87 | extern void syms_of_gnutls (void); | ||
| 88 | |||
| 89 | #endif | 89 | #endif |
diff --git a/src/xdisp.c b/src/xdisp.c index 0d314688c26..f022790023b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8794,12 +8794,7 @@ move_it_in_display_line_to (struct it *it, | |||
| 8794 | doesn't fit on the line, e.g. a wide image. */ | 8794 | doesn't fit on the line, e.g. a wide image. */ |
| 8795 | it->hpos == 0 | 8795 | it->hpos == 0 |
| 8796 | || (new_x == it->last_visible_x | 8796 | || (new_x == it->last_visible_x |
| 8797 | && FRAME_WINDOW_P (it->f) | 8797 | && FRAME_WINDOW_P (it->f))) |
| 8798 | /* When word-wrap is ON and we have a valid | ||
| 8799 | wrap point, we don't allow the last glyph | ||
| 8800 | to "just barely fit" on the line. */ | ||
| 8801 | && (it->line_wrap != WORD_WRAP | ||
| 8802 | || wrap_it.sp < 0))) | ||
| 8803 | { | 8798 | { |
| 8804 | ++it->hpos; | 8799 | ++it->hpos; |
| 8805 | it->current_x = new_x; | 8800 | it->current_x = new_x; |
| @@ -8866,7 +8861,8 @@ move_it_in_display_line_to (struct it *it, | |||
| 8866 | } | 8861 | } |
| 8867 | if (ITERATOR_AT_END_OF_LINE_P (it) | 8862 | if (ITERATOR_AT_END_OF_LINE_P (it) |
| 8868 | && (it->line_wrap != WORD_WRAP | 8863 | && (it->line_wrap != WORD_WRAP |
| 8869 | || wrap_it.sp < 0)) | 8864 | || wrap_it.sp < 0 |
| 8865 | || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))) | ||
| 8870 | { | 8866 | { |
| 8871 | result = MOVE_NEWLINE_OR_CR; | 8867 | result = MOVE_NEWLINE_OR_CR; |
| 8872 | break; | 8868 | break; |
| @@ -20438,7 +20434,8 @@ display_line (struct it *it) | |||
| 20438 | { | 20434 | { |
| 20439 | /* If line-wrap is on, check if a previous | 20435 | /* If line-wrap is on, check if a previous |
| 20440 | wrap point was found. */ | 20436 | wrap point was found. */ |
| 20441 | if (wrap_row_used > 0 | 20437 | if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it) |
| 20438 | && wrap_row_used > 0 | ||
| 20442 | /* Even if there is a previous wrap | 20439 | /* Even if there is a previous wrap |
| 20443 | point, continue the line here as | 20440 | point, continue the line here as |
| 20444 | usual, if (i) the previous character | 20441 | usual, if (i) the previous character |
| @@ -20468,6 +20465,18 @@ display_line (struct it *it) | |||
| 20468 | row->continued_p = 0; | 20465 | row->continued_p = 0; |
| 20469 | row->exact_window_width_line_p = 1; | 20466 | row->exact_window_width_line_p = 1; |
| 20470 | } | 20467 | } |
| 20468 | /* If line-wrap is on, check if a | ||
| 20469 | previous wrap point was found. */ | ||
| 20470 | else if (wrap_row_used > 0 | ||
| 20471 | /* Even if there is a previous wrap | ||
| 20472 | point, continue the line here as | ||
| 20473 | usual, if (i) the previous character | ||
| 20474 | was a space or tab AND (ii) the | ||
| 20475 | current character is not. */ | ||
| 20476 | && (!may_wrap | ||
| 20477 | || IT_DISPLAYING_WHITESPACE (it))) | ||
| 20478 | goto back_to_wrap; | ||
| 20479 | |||
| 20471 | } | 20480 | } |
| 20472 | } | 20481 | } |
| 20473 | else if (it->bidi_p) | 20482 | else if (it->bidi_p) |