aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Zlatanov2014-12-12 19:15:10 -0500
committerTed Zlatanov2014-12-12 19:23:19 -0500
commit28e0d0c95d8e17e18e94744e99ccd68c8c911703 (patch)
treea45021bd7042b2008cf6084bd4019777b7575492
parentb81a1837916a7f3f7abd953338302fa237a532f2 (diff)
downloademacs-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
-rw-r--r--.gitignore7
-rw-r--r--ChangeLog62
-rw-r--r--admin/MAINTAINERS23
-rwxr-xr-xbuild-aux/git-hooks/commit-msg72
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/text.texi8
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/net/tramp-sh.el52
-rw-r--r--lisp/progmodes/python.el4
-rw-r--r--lisp/simple.el2
-rw-r--r--src/ChangeLog23
-rw-r--r--src/emacs.c4
-rw-r--r--src/gnutls.c55
-rw-r--r--src/gnutls.h4
-rw-r--r--src/xdisp.c25
15 files changed, 257 insertions, 104 deletions
diff --git a/.gitignore b/.gitignore
index 228deaaf8e5..188dd9f55d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,10 +64,8 @@ lib/getopt.h
64lib/inttypes.h 64lib/inttypes.h
65lib/libgnu.a 65lib/libgnu.a
66lib/signal.h 66lib/signal.h
67lib/stdalign.h 67lib/std*.h
68lib/stdint.h 68!lib/std*.in.h
69lib/stdio.h
70lib/stdlib.h
71lib/string.h 69lib/string.h
72lib/sys/ 70lib/sys/
73lib/time.h 71lib/time.h
@@ -237,6 +235,7 @@ info/dir
237*.rej 235*.rej
238*~ 236*~
239.#* 237.#*
238\#*\#
240[0-9]*.patch 239[0-9]*.patch
241 240
242# Built by 'make install'. 241# Built by 'make install'.
diff --git a/ChangeLog b/ChangeLog
index 32083d7b7f9..631682365d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,65 @@
12014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * .gitignore: Copy over sufficient ignorable files from the old
4 .bzrignore that a simple build doesn't list lots of unregistered
5 files.
6
72014-11-11 Eric S. Raymond <esr@thyrsus.com>
8
9 * Makefile.in: git transition - set VCWITNESS appropriately for git.
10
11 All bzr revision IDS, and all CVS revision IDs for which a commit
12 could be identified, were changed to time-date!committer version
13 stamps. All .cvsignore files in the history became .gitignore
14 files. Fixes-bug annotations from bzr were copied into the
15 corresponding commit comments.
16
17 (The first .cvsignore commit was 1999-09-30T14:07:54Z!fx@gnu.org.
18 The last CVS commit was 2009-12-27T08:11:12Z!cyd@stupidchicken.com.)
19
20 Committer/author email addresses are generally correct for the
21 transition day, not necessarily when the comit was originally
22 made.
23
242014-12-12 Paul Eggert <eggert@cs.ucla.edu>
25
26 Git ignore lib/std*.h
27 * .gitignore: Add lib/std*.h, to ignore stdarg.h, stdbool.h, and
28 stddef.h. Remove subsumed entries.
29 Add !lib/std*.in.h, so as to not ignore the .in.h files.
30
312014-12-11 Paul Eggert <eggert@cs.ucla.edu>
32
33 Port commit-msg to mawk
34 Problem reported by Ted Zlatanov in:
35 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg01093.html
36 * build-aux/git-hooks/commit-msg (space, non_space, non_print):
37 New vars. Use them as approximations to POSIX bracket expressions,
38 on implementations like mawk that do not support POSIX regexps.
39
40 Improve commit-msg messages and autosquash
41 Problem reported by Michal Nazarewicz in Bug#19337.
42 * build-aux/git-hooks/commit-msg: Add "commit message" to
43 diagnostics. Distinguish better between tabs and other
44 unprintable chars in diagnostics. Don't complain if a prefix
45 "fixup! " or "squash! " makes a summary line too long.
46
472014-12-08 Paul Eggert <eggert@cs.ucla.edu>
48
49 Port commit-message checking to FreeBSD 9.
50 This fixes a bug reported by Jan Djärv in:
51 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00704.html
52 along with some other issues I noticed while testing with FreeBSD.
53 * build-aux/git-hooks/commit-msg: Prefer gawk if available.
54 Prefer en_US.UTF-8 to en_US.utf8, as it's more portable.
55 Work around bug in FreeBSD 9 awk, where /[[:cntrl:]]/ matches
56 ordinary text characters.
57 Be less tricky about quoting "'" in a shell script.
58
592014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
60
61 * .gitignore: Ignore autosave files.
62
12014-12-12 Paul Eggert <eggert@cs.ucla.edu> 632014-12-12 Paul Eggert <eggert@cs.ucla.edu>
2 64
3 Merge from gnulib 65 Merge from gnulib
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 9a46b64c3e8..57f199b27c2 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -31,6 +31,7 @@ Eli Zaretskii
31 src/msdos.[ch] 31 src/msdos.[ch]
32 src/dosfns.[ch] 32 src/dosfns.[ch]
33 src/w16select.c 33 src/w16select.c
34 src/unexcoff.c
34 lisp/term/internal.el 35 lisp/term/internal.el
35 lisp/term/pc-win.el 36 lisp/term/pc-win.el
36 lisp/dos-fns.el 37 lisp/dos-fns.el
@@ -80,14 +81,18 @@ Bastien Guerry
80Eli Zaretskii 81Eli Zaretskii
81 doc/* 82 doc/*
82 lispref/* 83 lispref/*
83 info/dir
84 84
85 src/xfaces.c 85 src/xfaces.c
86 src/xdisp.c 86 src/xdisp.c
87 src/term.c 87 src/term.c
88 src/dispnew.c 88 src/dispnew.c
89 src/dispextern.h
89 src/frame.c 90 src/frame.c
90 src/dired.c 91 src/dired.c
92 src/unexw32.c
93 src/w32*.[ch]
94 src/window.c
95 nt/*
91 96
92 lisp/arc-mode.el 97 lisp/arc-mode.el
93 lisp/menu-bar.el 98 lisp/menu-bar.el
@@ -97,6 +102,8 @@ Eli Zaretskii
97 lisp/startup.el 102 lisp/startup.el
98 lisp/w32*.el 103 lisp/w32*.el
99 104
105 admin/unidata/*
106
100Stefan Monnier 107Stefan Monnier
101 src/intervals.c 108 src/intervals.c
102 src/keyboard.c 109 src/keyboard.c
@@ -181,24 +188,10 @@ src/tparam.c
181src/undo.c 188src/undo.c
182src/unexaix.c 189src/unexaix.c
183src/unexalpha.c 190src/unexalpha.c
184src/unexcoff.c
185src/unexelf.c 191src/unexelf.c
186src/unexhp9k800.c 192src/unexhp9k800.c
187src/unexw32.c
188src/vm-limit.c 193src/vm-limit.c
189src/w32.c
190src/w32console.c
191src/w32fns.c
192src/w32heap.c
193src/w32inevt.c
194src/w32menu.c
195src/w32proc.c
196src/w32reg.c
197src/w32select.c
198src/w32term.c
199src/w32xfns.c
200src/widget.c 194src/widget.c
201src/window.c
202src/xfns.c 195src/xfns.c
203src/xmenu.c 196src/xmenu.c
204src/xrdb.c 197src/xrdb.c
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index 6a09eddf88b..5eb994c6fe0 100755
--- a/build-aux/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -20,69 +20,101 @@
20 20
21# Written by Paul Eggert. 21# Written by Paul Eggert.
22 22
23# Prefer gawk if available, as it handles NUL bytes properly.
24if type gawk >/dev/null 2>&1; then
25 awk=gawk
26else
27 awk=awk
28fi
29
23# Use a UTF-8 locale if available, so that the UTF-8 check works. 30# Use a UTF-8 locale if available, so that the UTF-8 check works.
24# Use U+00A2 CENT SIGN to test whether the locale works. 31# Use U+00A2 CENT SIGN to test whether the locale works.
25cent_sign_utf8_octal='\302\242' 32cent_sign_utf8_octal='\302\242'
26at_sign=` 33at_sign=`
27 printf "${cent_sign_utf8_octal}@" | 34 printf "${cent_sign_utf8_octal}@" |
28 awk '{print substr($0, 2)}' 2>/dev/null 35 $awk '{print substr($0, 2)}' 2>/dev/null
29` 36`
30if test "$at_sign" != @; then 37if test "$at_sign" != @; then
31 at_sign=` 38 at_sign=`
32 printf "${cent_sign_utf8_octal}@" | 39 printf "${cent_sign_utf8_octal}@" |
33 LC_ALL=en_US.utf8 awk '{print substr($0, 2)}' 2>/dev/null 40 LC_ALL=en_US.UTF-8 $awk '{print substr($0, 2)}' 2>/dev/null
34 ` 41 `
35 if test "$at_sign" = @; then 42 if test "$at_sign" = @; then
36 LC_ALL=en_US.utf8; export LC_ALL 43 LC_ALL=en_US.UTF-8; export LC_ALL
37 fi 44 fi
38fi 45fi
39 46
40# Check the log entry. 47# Check the log entry.
41exec awk ' 48exec $awk '
49 BEGIN {
50 if (" " ~ /[[:space:]]/) {
51 space = "[[:space:]]"
52 non_space = "[^[:space:]]"
53 non_print = "[^[:print:]]"
54 } else {
55 # mawk 1.3.3 does not support POSIX bracket expressions.
56 # Approximate them as best we can.
57 space = "[ \f\n\r\t\v]"
58 non_space = "[^ \f\n\r\t\v]"
59 non_print = "[\1-\37\177]"
60 }
61 }
62
42 /^#/ { next } 63 /^#/ { next }
43 64
44 !/^.*$/ { 65 !/^.*$/ {
45 print "Invalid character (not UTF-8)" 66 print "Invalid character (not UTF-8) in commit message"
46 status = 1 67 status = 1
47 } 68 }
48 69
49 nlines == 0 && !/[^[:space:]]/ { next } 70 nlines == 0 && $0 !~ non_space { next }
50 71
51 { nlines++ } 72 { nlines++ }
52 73
53 nlines == 1 && /^[[:space:]]/ { 74 nlines == 1 {
54 print "White space at start of first line" 75 # Ignore special markers used by "git rebase --autosquash".
55 status = 1 76 if (! sub(/^fixup! /, ""))
56 } 77 sub(/^squash! /, "")
57 78
58 nlines == 2 && /[^[:space:]]/ { 79 if ($0 ~ "^" space) {
59 print "Nonempty second line" 80 print "White space at start of commit message'\''s first line"
60 status = 1 81 status = 1
82 }
61 } 83 }
62 84
63 /[[:cntrl:]]/ { 85 nlines == 2 && $0 ~ non_space {
64 print "Text contains control character; please use spaces instead of tabs" 86 print "Nonempty second line in commit message"
65 status = 1 87 status = 1
66 } 88 }
67 89
68 72 < length && /[[:space:]]/ { 90 72 < length && $0 ~ space {
69 print "Line longer than 72 characters" 91 print "Line longer than 72 characters in commit message"
70 status = 1 92 status = 1
71 } 93 }
72 94
73 140 < length { 95 140 < length {
74 print "Word longer than 140 characters" 96 print "Word longer than 140 characters in commit message"
75 status = 1 97 status = 1
76 } 98 }
77 99
78 /^Signed-off-by: / { 100 /^Signed-off-by: / {
79 print "'Signed-off-by:' present" 101 print "'\''Signed-off-by:'\'' in commit message"
102 status = 1
103 }
104
105 $0 ~ non_print {
106 if (gsub(/\t/, "")) {
107 print "Tab in commit message; please use spaces instead"
108 }
109 if ($0 ~ non_print) {
110 print "Unprintable character in commit message"
111 }
80 status = 1 112 status = 1
81 } 113 }
82 114
83 END { 115 END {
84 if (nlines == 0) { 116 if (nlines == 0) {
85 print "Empty change log entry" 117 print "Empty commit message"
86 status = 1 118 status = 1
87 } 119 }
88 exit status 120 exit status
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e7b5606b681..ad94751a790 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12014-12-11 Eli Zaretskii <eliz@gnu.org>
2
3 * text.texi (Comparing Text): Prevent a text string from being
4 broken between 2 lines. (Bug#19257)
5
12014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org> 62014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * files.texi (Contents of Directories): Document 8 * files.texi (Contents of Directories): Document
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 720343cb17d..3ef565b8f30 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -349,10 +349,10 @@ This function ignores case when comparing characters
349if @code{case-fold-search} is non-@code{nil}. It always ignores 349if @code{case-fold-search} is non-@code{nil}. It always ignores
350text properties. 350text properties.
351 351
352Suppose the current buffer contains the text @samp{foobarbar 352Suppose you have the text @w{@samp{foobarbar haha!rara!}} in the
353haha!rara!}; then in this example the two substrings are @samp{rbar } 353current buffer; then in this example the two substrings are @samp{rbar
354and @samp{rara!}. The value is 2 because the first substring is greater 354} and @samp{rara!}. The value is 2 because the first substring is
355at the second character. 355greater at the second character.
356 356
357@example 357@example
358(compare-buffer-substrings nil 6 11 nil 16 21) 358(compare-buffer-substrings nil 6 11 nil 16 21)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1db7c97680e..a41b5cc52aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12014-12-12 Michael Albinus <michael.albinus@gmx.de>
2
3 * simple.el (password-word-equivalents): Add "passcode", used for
4 numeric secrets like PINs or RSA tokens.
5
62014-12-10 Michael Albinus <michael.albinus@gmx.de>
7
8 * net/tramp-sh.el (tramp-get-remote-path): Use a login shell in
9 order to determine `tramp-own-remote-path'.
10
112014-12-09 Fabián Ezequiel Gallina <fgallina@gnu.org>
12
13 * progmodes/python.el (python-shell-parse-command): Quote
14 `python-shell-interpreter`. (Bug#19289)
15
12014-12-12 Stefan Monnier <monnier@iro.umontreal.ca> 162014-12-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 17
3 * progmodes/python.el (python-indent-line): Use `noindent' in strings. 18 * progmodes/python.el (python-indent-line): Use `noindent' in strings.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c564988d370..c4d5e2fa97a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3868,6 +3868,18 @@ file exists and nonzero exit status otherwise."
3868 (setq item (pop alist)) 3868 (setq item (pop alist))
3869 (when (string-match (car item) shell) 3869 (when (string-match (car item) shell)
3870 (setq extra-args (cdr item)))) 3870 (setq extra-args (cdr item))))
3871 ;; It is useful to set the prompt in the following command
3872 ;; because some people have a setting for $PS1 which /bin/sh
3873 ;; doesn't know about and thus /bin/sh will display a strange
3874 ;; prompt. For example, if $PS1 has "${CWD}" in the value, then
3875 ;; ksh will display the current working directory but /bin/sh
3876 ;; will display a dollar sign. The following command line sets
3877 ;; $PS1 to a sane value, and works under Bourne-ish shells as
3878 ;; well as csh-like shells. We also unset the variable $ENV
3879 ;; because that is read by some sh implementations (eg, bash
3880 ;; when called as sh) on startup; this way, we avoid the startup
3881 ;; file clobbering $PS1. $PROMPT_COMMAND is another way to set
3882 ;; the prompt in /bin/bash, it must be discarded as well.
3871 (tramp-send-command 3883 (tramp-send-command
3872 vec (format 3884 vec (format
3873 "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" 3885 "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
@@ -3944,20 +3956,6 @@ seconds. If not, it produces an error message with the given ERROR-ARGS."
3944Mainly sets the prompt and the echo correctly. PROC is the shell 3956Mainly sets the prompt and the echo correctly. PROC is the shell
3945process to set up. VEC specifies the connection." 3957process to set up. VEC specifies the connection."
3946 (let ((tramp-end-of-output tramp-initial-end-of-output)) 3958 (let ((tramp-end-of-output tramp-initial-end-of-output))
3947 ;; It is useful to set the prompt in the following command because
3948 ;; some people have a setting for $PS1 which /bin/sh doesn't know
3949 ;; about and thus /bin/sh will display a strange prompt. For
3950 ;; example, if $PS1 has "${CWD}" in the value, then ksh will
3951 ;; display the current working directory but /bin/sh will display
3952 ;; a dollar sign. The following command line sets $PS1 to a sane
3953 ;; value, and works under Bourne-ish shells as well as csh-like
3954 ;; shells. Daniel Pittman reports that the unusual positioning of
3955 ;; the single quotes makes it work under `rc', too. We also unset
3956 ;; the variable $ENV because that is read by some sh
3957 ;; implementations (eg, bash when called as sh) on startup; this
3958 ;; way, we avoid the startup file clobbering $PS1. $PROMPT_COMMAND
3959 ;; is another way to set the prompt in /bin/bash, it must be
3960 ;; discarded as well.
3961 (tramp-open-shell 3959 (tramp-open-shell
3962 vec 3960 vec
3963 (or (tramp-get-connection-property vec "remote-shell" nil) 3961 (or (tramp-get-connection-property vec "remote-shell" nil)
@@ -5046,13 +5044,25 @@ Return ATTR."
5046 "/bin:/usr/bin") 5044 "/bin:/usr/bin")
5047 "/bin:/usr/bin")))) 5045 "/bin:/usr/bin"))))
5048 (own-remote-path 5046 (own-remote-path
5049 (when elt2 5047 ;; We cannot apply `tramp-send-command-and-read' because
5050 (condition-case nil 5048 ;; the login shell could return more than just the $PATH
5051 (tramp-send-command-and-read vec "echo \\\"$PATH\\\"") 5049 ;; string. So we emulate that function.
5052 (error 5050 (when elt2
5053 (tramp-message 5051 (tramp-send-command
5054 vec 3 "$PATH not set, ignoring `tramp-own-remote-path'.") 5052 vec
5055 nil))))) 5053 (format
5054 "%s -l %s 'echo \\\"$PATH\\\"'"
5055 (tramp-get-method-parameter
5056 (tramp-file-name-method vec) 'tramp-remote-shell)
5057 (mapconcat
5058 'identity
5059 (tramp-get-method-parameter
5060 (tramp-file-name-method vec) 'tramp-remote-shell-args)
5061 " ")))
5062 (with-current-buffer (tramp-get-connection-buffer vec)
5063 (goto-char (point-max))
5064 (forward-line -1)
5065 (read (current-buffer))))))
5056 5066
5057 ;; Replace place holder `tramp-default-remote-path'. 5067 ;; Replace place holder `tramp-default-remote-path'.
5058 (when elt1 5068 (when elt1
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f1d8cff15ee..35e24e14e1c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2125,7 +2125,9 @@ uniqueness for different types of configurations."
2125 ;; `python-shell-interpreter' absolute path can be found by 2125 ;; `python-shell-interpreter' absolute path can be found by
2126 ;; `executable-find'. 2126 ;; `executable-find'.
2127 (format "%s %s" 2127 (format "%s %s"
2128 (executable-find python-shell-interpreter) 2128 ;; FIXME: Why executable-find?
2129 (shell-quote-argument
2130 (executable-find python-shell-interpreter))
2129 python-shell-interpreter-args))) 2131 python-shell-interpreter-args)))
2130 2132
2131(define-obsolete-function-alias 2133(define-obsolete-function-alias
diff --git a/lisp/simple.el b/lisp/simple.el
index 9f447988a2f..0fcd5db45d9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2796,7 +2796,7 @@ which is defined in the `warnings' library.\n")
2796 t)) 2796 t))
2797 2797
2798(defcustom password-word-equivalents 2798(defcustom password-word-equivalents
2799 '("password" "passphrase" "pass phrase" 2799 '("password" "passcode" "passphrase" "pass phrase"
2800 ; These are sorted according to the GNU en_US locale. 2800 ; These are sorted according to the GNU en_US locale.
2801 "암호" ; ko 2801 "암호" ; ko
2802 "パスワード" ; ja 2802 "パスワード" ; ja
diff --git a/src/ChangeLog b/src/ChangeLog
index 887ca89261a..fd37eaefbec 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,26 @@
12014-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
72014-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
182014-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
12014-12-11 Stefan Monnier <monnier@iro.umontreal.ca> 242014-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
782DEFUN ("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
802static Lisp_Object 782static Lisp_Object
803gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix) 783gnutls_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
1586DEFUN ("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
1605void 1610void
1606syms_of_gnutls (void) 1611syms_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.
16561 is for important messages, 2 is for debug data, and higher numbers 16611 is for important messages, 2 is for debug data, and higher numbers
1657are as per the GnuTLS logging conventions. */); 1662are 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
83extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); 83extern Lisp_Object emacs_gnutls_deinit (Lisp_Object);
84 84
85extern void syms_of_gnutls (void);
86
87#endif 85#endif
88 86
87extern 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)