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
This commit is contained in:
Ted Zlatanov 2014-12-12 19:15:10 -05:00
parent b81a183791
commit 28e0d0c95d
15 changed files with 260 additions and 107 deletions

7
.gitignore vendored
View file

@ -64,10 +64,8 @@ lib/getopt.h
lib/inttypes.h
lib/libgnu.a
lib/signal.h
lib/stdalign.h
lib/stdint.h
lib/stdio.h
lib/stdlib.h
lib/std*.h
!lib/std*.in.h
lib/string.h
lib/sys/
lib/time.h
@ -237,6 +235,7 @@ info/dir
*.rej
*~
.#*
\#*\#
[0-9]*.patch
# Built by 'make install'.

View file

@ -1,3 +1,65 @@
2014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* .gitignore: Copy over sufficient ignorable files from the old
.bzrignore that a simple build doesn't list lots of unregistered
files.
2014-11-11 Eric S. Raymond <esr@thyrsus.com>
* Makefile.in: git transition - set VCWITNESS appropriately for git.
All bzr revision IDS, and all CVS revision IDs for which a commit
could be identified, were changed to time-date!committer version
stamps. All .cvsignore files in the history became .gitignore
files. Fixes-bug annotations from bzr were copied into the
corresponding commit comments.
(The first .cvsignore commit was 1999-09-30T14:07:54Z!fx@gnu.org.
The last CVS commit was 2009-12-27T08:11:12Z!cyd@stupidchicken.com.)
Committer/author email addresses are generally correct for the
transition day, not necessarily when the comit was originally
made.
2014-12-12 Paul Eggert <eggert@cs.ucla.edu>
Git ignore lib/std*.h
* .gitignore: Add lib/std*.h, to ignore stdarg.h, stdbool.h, and
stddef.h. Remove subsumed entries.
Add !lib/std*.in.h, so as to not ignore the .in.h files.
2014-12-11 Paul Eggert <eggert@cs.ucla.edu>
Port commit-msg to mawk
Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg01093.html
* build-aux/git-hooks/commit-msg (space, non_space, non_print):
New vars. Use them as approximations to POSIX bracket expressions,
on implementations like mawk that do not support POSIX regexps.
Improve commit-msg messages and autosquash
Problem reported by Michal Nazarewicz in Bug#19337.
* build-aux/git-hooks/commit-msg: Add "commit message" to
diagnostics. Distinguish better between tabs and other
unprintable chars in diagnostics. Don't complain if a prefix
"fixup! " or "squash! " makes a summary line too long.
2014-12-08 Paul Eggert <eggert@cs.ucla.edu>
Port commit-message checking to FreeBSD 9.
This fixes a bug reported by Jan Djärv in:
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00704.html
along with some other issues I noticed while testing with FreeBSD.
* build-aux/git-hooks/commit-msg: Prefer gawk if available.
Prefer en_US.UTF-8 to en_US.utf8, as it's more portable.
Work around bug in FreeBSD 9 awk, where /[[:cntrl:]]/ matches
ordinary text characters.
Be less tricky about quoting "'" in a shell script.
2014-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
* .gitignore: Ignore autosave files.
2014-12-12 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib

View file

@ -31,6 +31,7 @@ Eli Zaretskii
src/msdos.[ch]
src/dosfns.[ch]
src/w16select.c
src/unexcoff.c
lisp/term/internal.el
lisp/term/pc-win.el
lisp/dos-fns.el
@ -80,14 +81,18 @@ Bastien Guerry
Eli Zaretskii
doc/*
lispref/*
info/dir
src/xfaces.c
src/xdisp.c
src/term.c
src/dispnew.c
src/dispextern.h
src/frame.c
src/dired.c
src/unexw32.c
src/w32*.[ch]
src/window.c
nt/*
lisp/arc-mode.el
lisp/menu-bar.el
@ -97,6 +102,8 @@ Eli Zaretskii
lisp/startup.el
lisp/w32*.el
admin/unidata/*
Stefan Monnier
src/intervals.c
src/keyboard.c
@ -181,24 +188,10 @@ src/tparam.c
src/undo.c
src/unexaix.c
src/unexalpha.c
src/unexcoff.c
src/unexelf.c
src/unexhp9k800.c
src/unexw32.c
src/vm-limit.c
src/w32.c
src/w32console.c
src/w32fns.c
src/w32heap.c
src/w32inevt.c
src/w32menu.c
src/w32proc.c
src/w32reg.c
src/w32select.c
src/w32term.c
src/w32xfns.c
src/widget.c
src/window.c
src/xfns.c
src/xmenu.c
src/xrdb.c

View file

@ -20,69 +20,101 @@
# Written by Paul Eggert.
# Prefer gawk if available, as it handles NUL bytes properly.
if type gawk >/dev/null 2>&1; then
awk=gawk
else
awk=awk
fi
# Use a UTF-8 locale if available, so that the UTF-8 check works.
# Use U+00A2 CENT SIGN to test whether the locale works.
cent_sign_utf8_octal='\302\242'
at_sign=`
printf "${cent_sign_utf8_octal}@" |
awk '{print substr($0, 2)}' 2>/dev/null
$awk '{print substr($0, 2)}' 2>/dev/null
`
if test "$at_sign" != @; then
at_sign=`
printf "${cent_sign_utf8_octal}@" |
LC_ALL=en_US.utf8 awk '{print substr($0, 2)}' 2>/dev/null
LC_ALL=en_US.UTF-8 $awk '{print substr($0, 2)}' 2>/dev/null
`
if test "$at_sign" = @; then
LC_ALL=en_US.utf8; export LC_ALL
LC_ALL=en_US.UTF-8; export LC_ALL
fi
fi
# Check the log entry.
exec awk '
exec $awk '
BEGIN {
if (" " ~ /[[:space:]]/) {
space = "[[:space:]]"
non_space = "[^[:space:]]"
non_print = "[^[:print:]]"
} else {
# mawk 1.3.3 does not support POSIX bracket expressions.
# Approximate them as best we can.
space = "[ \f\n\r\t\v]"
non_space = "[^ \f\n\r\t\v]"
non_print = "[\1-\37\177]"
}
}
/^#/ { next }
!/^.*$/ {
print "Invalid character (not UTF-8)"
print "Invalid character (not UTF-8) in commit message"
status = 1
}
nlines == 0 && !/[^[:space:]]/ { next }
nlines == 0 && $0 !~ non_space { next }
{ nlines++ }
nlines == 1 && /^[[:space:]]/ {
print "White space at start of first line"
nlines == 1 {
# Ignore special markers used by "git rebase --autosquash".
if (! sub(/^fixup! /, ""))
sub(/^squash! /, "")
if ($0 ~ "^" space) {
print "White space at start of commit message'\''s first line"
status = 1
}
}
nlines == 2 && $0 ~ non_space {
print "Nonempty second line in commit message"
status = 1
}
nlines == 2 && /[^[:space:]]/ {
print "Nonempty second line"
status = 1
}
/[[:cntrl:]]/ {
print "Text contains control character; please use spaces instead of tabs"
status = 1
}
72 < length && /[[:space:]]/ {
print "Line longer than 72 characters"
72 < length && $0 ~ space {
print "Line longer than 72 characters in commit message"
status = 1
}
140 < length {
print "Word longer than 140 characters"
print "Word longer than 140 characters in commit message"
status = 1
}
/^Signed-off-by: / {
print "'Signed-off-by:' present"
print "'\''Signed-off-by:'\'' in commit message"
status = 1
}
$0 ~ non_print {
if (gsub(/\t/, "")) {
print "Tab in commit message; please use spaces instead"
}
if ($0 ~ non_print) {
print "Unprintable character in commit message"
}
status = 1
}
END {
if (nlines == 0) {
print "Empty change log entry"
print "Empty commit message"
status = 1
}
exit status

View file

@ -1,3 +1,8 @@
2014-12-11 Eli Zaretskii <eliz@gnu.org>
* text.texi (Comparing Text): Prevent a text string from being
broken between 2 lines. (Bug#19257)
2014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
* files.texi (Contents of Directories): Document

View file

@ -349,10 +349,10 @@ This function ignores case when comparing characters
if @code{case-fold-search} is non-@code{nil}. It always ignores
text properties.
Suppose the current buffer contains the text @samp{foobarbar
haha!rara!}; then in this example the two substrings are @samp{rbar }
and @samp{rara!}. The value is 2 because the first substring is greater
at the second character.
Suppose you have the text @w{@samp{foobarbar haha!rara!}} in the
current buffer; then in this example the two substrings are @samp{rbar
} and @samp{rara!}. The value is 2 because the first substring is
greater at the second character.
@example
(compare-buffer-substrings nil 6 11 nil 16 21)

View file

@ -1,3 +1,18 @@
2014-12-12 Michael Albinus <michael.albinus@gmx.de>
* simple.el (password-word-equivalents): Add "passcode", used for
numeric secrets like PINs or RSA tokens.
2014-12-10 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-get-remote-path): Use a login shell in
order to determine `tramp-own-remote-path'.
2014-12-09 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-shell-parse-command): Quote
`python-shell-interpreter`. (Bug#19289)
2014-12-12 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-indent-line): Use `noindent' in strings.

View file

@ -3868,6 +3868,18 @@ file exists and nonzero exit status otherwise."
(setq item (pop alist))
(when (string-match (car item) shell)
(setq extra-args (cdr item))))
;; It is useful to set the prompt in the following command
;; because some people have a setting for $PS1 which /bin/sh
;; doesn't know about and thus /bin/sh will display a strange
;; prompt. For example, if $PS1 has "${CWD}" in the value, then
;; ksh will display the current working directory but /bin/sh
;; will display a dollar sign. The following command line sets
;; $PS1 to a sane value, and works under Bourne-ish shells as
;; well as csh-like shells. We also unset the variable $ENV
;; because that is read by some sh implementations (eg, bash
;; when called as sh) on startup; this way, we avoid the startup
;; file clobbering $PS1. $PROMPT_COMMAND is another way to set
;; the prompt in /bin/bash, it must be discarded as well.
(tramp-send-command
vec (format
"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."
Mainly sets the prompt and the echo correctly. PROC is the shell
process to set up. VEC specifies the connection."
(let ((tramp-end-of-output tramp-initial-end-of-output))
;; It is useful to set the prompt in the following command because
;; some people have a setting for $PS1 which /bin/sh doesn't know
;; about and thus /bin/sh will display a strange prompt. For
;; example, if $PS1 has "${CWD}" in the value, then ksh will
;; display the current working directory but /bin/sh will display
;; a dollar sign. The following command line sets $PS1 to a sane
;; value, and works under Bourne-ish shells as well as csh-like
;; shells. Daniel Pittman reports that the unusual positioning of
;; the single quotes makes it work under `rc', too. We also unset
;; the variable $ENV because that is read by some sh
;; implementations (eg, bash when called as sh) on startup; this
;; way, we avoid the startup file clobbering $PS1. $PROMPT_COMMAND
;; is another way to set the prompt in /bin/bash, it must be
;; discarded as well.
(tramp-open-shell
vec
(or (tramp-get-connection-property vec "remote-shell" nil)
@ -5046,13 +5044,25 @@ Return ATTR."
"/bin:/usr/bin")
"/bin:/usr/bin"))))
(own-remote-path
(when elt2
(condition-case nil
(tramp-send-command-and-read vec "echo \\\"$PATH\\\"")
(error
(tramp-message
vec 3 "$PATH not set, ignoring `tramp-own-remote-path'.")
nil)))))
;; We cannot apply `tramp-send-command-and-read' because
;; the login shell could return more than just the $PATH
;; string. So we emulate that function.
(when elt2
(tramp-send-command
vec
(format
"%s -l %s 'echo \\\"$PATH\\\"'"
(tramp-get-method-parameter
(tramp-file-name-method vec) 'tramp-remote-shell)
(mapconcat
'identity
(tramp-get-method-parameter
(tramp-file-name-method vec) 'tramp-remote-shell-args)
" ")))
(with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-max))
(forward-line -1)
(read (current-buffer))))))
;; Replace place holder `tramp-default-remote-path'.
(when elt1

View file

@ -2125,7 +2125,9 @@ uniqueness for different types of configurations."
;; `python-shell-interpreter' absolute path can be found by
;; `executable-find'.
(format "%s %s"
(executable-find python-shell-interpreter)
;; FIXME: Why executable-find?
(shell-quote-argument
(executable-find python-shell-interpreter))
python-shell-interpreter-args)))
(define-obsolete-function-alias

View file

@ -2796,7 +2796,7 @@ which is defined in the `warnings' library.\n")
t))
(defcustom password-word-equivalents
'("password" "passphrase" "pass phrase"
'("password" "passcode" "passphrase" "pass phrase"
; These are sorted according to the GNU en_US locale.
"암호" ; ko
"パスワード" ; ja

View file

@ -1,3 +1,26 @@
2014-12-12 Eli Zaretskii <eliz@gnu.org>
* gnutls.c (Fgnutls_available_p, syms_of_gnutls): Move
gnutls-available-p out of the HAVE_GNUTLS conditional, and define
them only once.
2014-12-11 Teodor Zlatanov <tzz@lifelogs.com>
* emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
* gnutls.h: Always declare syms_of_gnutls.
* gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
clarity. Let the availability check return Qnil when the GnuTLS
integration is not available, instead of erroring out.
(Bug#19346)
2014-12-10 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (move_it_in_display_line_to, display_line): Don't
disallow overflow-newline-into-fringe when word-wrap is in
effect. (Bug#19300)
2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c: Better preserve window-points during revert (bug#19161).

View file

@ -88,9 +88,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "sysselect.h"
#include "systime.h"
#ifdef HAVE_GNUTLS
#include "gnutls.h"
#endif
#if (defined PROFILING \
&& (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
syms_of_fontset ();
#endif /* HAVE_NS */
#ifdef HAVE_GNUTLS
syms_of_gnutls ();
#endif
#ifdef HAVE_GFILENOTIFY
syms_of_gfilenotify ();

View file

@ -779,26 +779,6 @@ See also `gnutls-init'. */)
return emacs_gnutls_deinit (proc);
}
DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
(void)
{
#ifdef WINDOWSNT
Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache);
if (CONSP (found))
return XCDR (found);
else
{
Lisp_Object status;
status = init_gnutls_functions () ? Qt : Qnil;
Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache);
return status;
}
#else
return Qt;
#endif
}
static Lisp_Object
gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix)
{
@ -1101,7 +1081,6 @@ The return value is a property list with top-level keys :warnings and
return result;
}
/* Initialize global GnuTLS state to defaults.
Call `gnutls-global-deinit' when GnuTLS usage is no longer needed.
Return zero on success. */
@ -1602,9 +1581,36 @@ This function may also return `gnutls-e-again', or
return gnutls_make_error (ret);
}
#endif /* HAVE_GNUTLS */
DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
doc: /* Return t if GnuTLS is available in this instance of Emacs. */)
(void)
{
#ifdef HAVE_GNUTLS
# ifdef WINDOWSNT
Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache);
if (CONSP (found))
return XCDR (found);
else
{
Lisp_Object status;
status = init_gnutls_functions () ? Qt : Qnil;
Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache);
return status;
}
# else /* !WINDOWSNT */
return Qt;
# endif /* !WINDOWSNT */
#else /* !HAVE_GNUTLS */
return Qnil;
#endif /* !HAVE_GNUTLS */
}
void
syms_of_gnutls (void)
{
#ifdef HAVE_GNUTLS
gnutls_global_initialized = 0;
DEFSYM (Qgnutls_dll, "gnutls");
@ -1646,7 +1652,6 @@ syms_of_gnutls (void)
defsubr (&Sgnutls_boot);
defsubr (&Sgnutls_deinit);
defsubr (&Sgnutls_bye);
defsubr (&Sgnutls_available_p);
defsubr (&Sgnutls_peer_status);
defsubr (&Sgnutls_peer_status_warning_describe);
@ -1656,6 +1661,8 @@ Set this larger than 0 to get debug output in the *Messages* buffer.
1 is for important messages, 2 is for debug data, and higher numbers
are as per the GnuTLS logging conventions. */);
global_gnutls_log_level = 0;
}
#endif /* HAVE_GNUTLS */
#endif /* HAVE_GNUTLS */
defsubr (&Sgnutls_available_p);
}

View file

@ -82,8 +82,8 @@ extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err);
#endif
extern Lisp_Object emacs_gnutls_deinit (Lisp_Object);
#endif
extern void syms_of_gnutls (void);
#endif
#endif

View file

@ -8794,12 +8794,7 @@ move_it_in_display_line_to (struct it *it,
doesn't fit on the line, e.g. a wide image. */
it->hpos == 0
|| (new_x == it->last_visible_x
&& FRAME_WINDOW_P (it->f)
/* When word-wrap is ON and we have a valid
wrap point, we don't allow the last glyph
to "just barely fit" on the line. */
&& (it->line_wrap != WORD_WRAP
|| wrap_it.sp < 0)))
&& FRAME_WINDOW_P (it->f)))
{
++it->hpos;
it->current_x = new_x;
@ -8866,7 +8861,8 @@ move_it_in_display_line_to (struct it *it,
}
if (ITERATOR_AT_END_OF_LINE_P (it)
&& (it->line_wrap != WORD_WRAP
|| wrap_it.sp < 0))
|| wrap_it.sp < 0
|| IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)))
{
result = MOVE_NEWLINE_OR_CR;
break;
@ -20438,7 +20434,8 @@ display_line (struct it *it)
{
/* If line-wrap is on, check if a previous
wrap point was found. */
if (wrap_row_used > 0
if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)
&& wrap_row_used > 0
/* Even if there is a previous wrap
point, continue the line here as
usual, if (i) the previous character
@ -20468,6 +20465,18 @@ display_line (struct it *it)
row->continued_p = 0;
row->exact_window_width_line_p = 1;
}
/* If line-wrap is on, check if a
previous wrap point was found. */
else if (wrap_row_used > 0
/* Even if there is a previous wrap
point, continue the line here as
usual, if (i) the previous character
was a space or tab AND (ii) the
current character is not. */
&& (!may_wrap
|| IT_DISPLAYING_WHITESPACE (it)))
goto back_to_wrap;
}
}
else if (it->bidi_p)