Merge from origin/emacs-25

9adb101 Document 'describe-fontset'
229315c ; Add missing symbol quoting.
3d94931 Repair desktop restoration on text terminals
43022f9 Ignore forward-sexp-function in js-mode indentation code
b19fb49 Improve documentation of 'define-coding-system'
467768f Fix Bug#25162
6db78ae Fix a typo in define-abbrev-table
5f7d906 Bump makeinfo requirement from 4.7 to 4.13
442e2f6 Fixes related to select-enable-clipboard
e4ac450 Define struct predicate before acccesors
08decbd Doc fix for vc-git
5531e75 Further improve make-dist checking
953bf67 Improve previous make-dist change
129645a Make make-dist --snapshot do some sanity checks

# Conflicts:
#	lisp/menu-bar.el
This commit is contained in:
Paul Eggert 2017-01-01 01:02:45 -08:00
commit 4f7a90bf6c
15 changed files with 119 additions and 39 deletions

View file

@ -1218,14 +1218,13 @@ esac
AC_SUBST([PAXCTL_dumped]) AC_SUBST([PAXCTL_dumped])
AC_SUBST([PAXCTL_notdumped]) AC_SUBST([PAXCTL_notdumped])
## Need makeinfo >= 4.7 (?) to build the manuals. ## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
if test "$MAKEINFO" != "no"; then if test "$MAKEINFO" != "no"; then
if test "$MAKEINFO" = "${am_missing_run}makeinfo"; then if test "$MAKEINFO" = "${am_missing_run}makeinfo"; then
MAKEINFO=makeinfo MAKEINFO=makeinfo
fi fi
case `($MAKEINFO --version) 2>/dev/null` in case `($MAKEINFO --version) 2>/dev/null` in
*' (GNU texinfo) '4.[[7-9]]* | \ *' (GNU texinfo) '4.1[[3-9]]* | \
*' (GNU texinfo) '4.[[1-9][0-9]]* | \
*' (GNU texinfo) '[[5-9]]* | \ *' (GNU texinfo) '[[5-9]]* | \
*' (GNU texinfo) '[[1-9][0-9]]* ) ;; *' (GNU texinfo) '[[1-9][0-9]]* ) ;;
*) MAKEINFO=no;; *) MAKEINFO=no;;
@ -1248,7 +1247,7 @@ if test "$MAKEINFO" = "no"; then
if test "x${with_makeinfo}" = "xno"; then if test "x${with_makeinfo}" = "xno"; then
HAVE_MAKEINFO=no HAVE_MAKEINFO=no
elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your
source tree does not seem to have pre-built manuals in the 'info' directory. source tree does not seem to have pre-built manuals in the 'info' directory.
Either install a suitable version of makeinfo, or re-run configure Either install a suitable version of makeinfo, or re-run configure
with the '--without-makeinfo' option to build without the manuals.] ) with the '--without-makeinfo' option to build without the manuals.] )

View file

@ -937,6 +937,8 @@ discard your changes.)
@findex auto-revert-mode @findex auto-revert-mode
@findex auto-revert-tail-mode @findex auto-revert-tail-mode
@vindex auto-revert-interval @vindex auto-revert-interval
@vindex auto-revert-remote-files
@vindex auto-revert-verbose
You can also tell Emacs to revert buffers periodically. To do this You can also tell Emacs to revert buffers periodically. To do this
for a specific buffer, enable the minor mode Auto-Revert mode by for a specific buffer, enable the minor mode Auto-Revert mode by
typing @kbd{M-x auto-revert-mode}. This automatically reverts the typing @kbd{M-x auto-revert-mode}. This automatically reverts the
@ -944,7 +946,8 @@ current buffer every five seconds; you can change the interval through
the variable @code{auto-revert-interval}. To do the same for all file the variable @code{auto-revert-interval}. To do the same for all file
buffers, type @kbd{M-x global-auto-revert-mode} to enable Global buffers, type @kbd{M-x global-auto-revert-mode} to enable Global
Auto-Revert mode. These minor modes do not check or revert remote Auto-Revert mode. These minor modes do not check or revert remote
files, because that is usually too slow. files, because that is usually too slow. This behavior can be changed
by setting the variable @code{auto-revert-remote-files} to non-@code{nil}.
One use of Auto-Revert mode is to ``tail'' a file such as a system One use of Auto-Revert mode is to ``tail'' a file such as a system
log, so that changes made to that file by other programs are log, so that changes made to that file by other programs are
@ -955,6 +958,9 @@ the end, use Auto-Revert Tail mode instead
(@code{auto-revert-tail-mode}). It is more efficient for this. (@code{auto-revert-tail-mode}). It is more efficient for this.
Auto-Revert Tail mode works also for remote files. Auto-Revert Tail mode works also for remote files.
When a buffer is auto-reverted, a message is generated. This can be
suppressed by setting @code{auto-revert-verbose} to @code{nil}.
@xref{VC Undo}, for commands to revert to earlier versions of files @xref{VC Undo}, for commands to revert to earlier versions of files
under version control. @xref{VC Mode Line}, for Auto Revert under version control. @xref{VC Mode Line}, for Auto Revert
peculiarities when visiting files under version control. peculiarities when visiting files under version control.

View file

@ -1369,6 +1369,13 @@ Resources}).
characters the font does not cover. The standard fontset is only used if characters the font does not cover. The standard fontset is only used if
explicitly requested, despite its name. explicitly requested, despite its name.
@findex describe-fontset
To show the information about a specific fontset, use the
@w{@kbd{M-x describe-fontset}} command. It prompts for a fontset
name, defaulting to the one used by the current frame, and then
displays all the subranges of characters and the fonts assigned to
them in that fontset.
A fontset does not necessarily specify a font for every character A fontset does not necessarily specify a font for every character
code. If a fontset specifies no font for a certain character, or if code. If a fontset specifies no font for a certain character, or if
it specifies a font that does not exist on your system, then it cannot it specifies a font that does not exist on your system, then it cannot

View file

@ -979,7 +979,7 @@ Properties with special meaning:
;; We used to manually add the docstring, but we also want to record this ;; We used to manually add the docstring, but we also want to record this
;; location as the definition of the variable (in load-history), so we may ;; location as the definition of the variable (in load-history), so we may
;; as well just use `defvar'. ;; as well just use `defvar'.
(if (and docstring props (symbolp docstring)) (when (and docstring props (symbolp docstring))
;; There is really no docstring, instead the docstring arg ;; There is really no docstring, instead the docstring arg
;; is a property name. ;; is a property name.
(push docstring props) (setq docstring nil)) (push docstring props) (setq docstring nil))

View file

@ -174,7 +174,7 @@ Thus, with this setting, Emacs might be non-responsive at times."
(defcustom auto-revert-verbose t (defcustom auto-revert-verbose t
"When nil, Auto-Revert Mode does not generate any messages. "When nil, Auto-Revert Mode does not generate any messages.
When non-nil, a message is generated whenever a file is reverted." When non-nil, a message is generated whenever a buffer is reverted."
:group 'auto-revert :group 'auto-revert
:type 'boolean) :type 'boolean)
@ -352,6 +352,9 @@ Auto-Revert Mode is a minor mode that affects only the current
buffer. When enabled, it reverts the buffer when the file on buffer. When enabled, it reverts the buffer when the file on
disk changes. disk changes.
When a buffer is reverted, a message is generated. This can be
suppressed by setting `auto-revert-verbose' to nil.
Use `global-auto-revert-mode' to automatically revert all buffers. Use `global-auto-revert-mode' to automatically revert all buffers.
Use `auto-revert-tail-mode' if you know that the file will only grow Use `auto-revert-tail-mode' if you know that the file will only grow
without being changed in the part that is already in the buffer." without being changed in the part that is already in the buffer."
@ -400,6 +403,9 @@ You can edit the buffer and turn this mode off and on again as
you please. But make sure the background process has stopped you please. But make sure the background process has stopped
writing before you save the file! writing before you save the file!
When a buffer is reverted, a message is generated. This can be
suppressed by setting `auto-revert-verbose' to nil.
Use `auto-revert-mode' for changes other than appends!" Use `auto-revert-mode' for changes other than appends!"
:group 'find-file :lighter auto-revert-tail-mode-text :group 'find-file :lighter auto-revert-tail-mode-text
(when auto-revert-tail-mode (when auto-revert-tail-mode
@ -464,6 +470,9 @@ documentation of that variable. It ignores buffers with modes
matching `global-auto-revert-ignore-modes', and buffers with a matching `global-auto-revert-ignore-modes', and buffers with a
non-nil vale of `global-auto-revert-ignore-buffer'. non-nil vale of `global-auto-revert-ignore-buffer'.
When a buffer is reverted, a message is generated. This can be
suppressed by setting `auto-revert-verbose' to nil.
This function calls the hook `global-auto-revert-mode-hook'. This function calls the hook `global-auto-revert-mode-hook'.
It displays the text that `global-auto-revert-mode-text' It displays the text that `global-auto-revert-mode-text'
specifies in the mode line." specifies in the mode line."

View file

@ -1158,13 +1158,13 @@ This function also sets `desktop-dirname' to nil."
;; ---------------------------------------------------------------------------- ;; ----------------------------------------------------------------------------
(defun desktop-restoring-frameset-p () (defun desktop-restoring-frameset-p ()
"True if calling `desktop-restore-frameset' will actually restore it." "True if calling `desktop-restore-frameset' will actually restore it."
(and desktop-restore-frames desktop-saved-frameset t)) (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t))
(defun desktop-restore-frameset () (defun desktop-restore-frameset ()
"Restore the state of a set of frames. "Restore the state of a set of frames.
This function depends on the value of `desktop-saved-frameset' This function depends on the value of `desktop-saved-frameset'
being set (usually, by reading it from the desktop)." being set (usually, by reading it from the desktop)."
(when (and (display-graphic-p) (desktop-restoring-frameset-p)) (when (desktop-restoring-frameset-p)
(frameset-restore desktop-saved-frameset (frameset-restore desktop-saved-frameset
:reuse-frames (eq desktop-restore-reuses-frames t) :reuse-frames (eq desktop-restore-reuses-frames t)
:cleanup-frames (not (eq desktop-restore-reuses-frames 'keep)) :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))

View file

@ -2708,6 +2708,14 @@ non-nil value, that slot cannot be set via `setf'.
(= safety 1)) (= safety 1))
(cons 'and (cl-cdddr pred-form)) (cons 'and (cl-cdddr pred-form))
`(,predicate cl-x)))) `(,predicate cl-x))))
(when pred-form
(push `(cl-defsubst ,predicate (cl-x)
(declare (side-effect-free error-free))
,(if (eq (car pred-form) 'and)
(append pred-form '(t))
`(and ,pred-form t)))
forms)
(push `(put ',name 'cl-deftype-satisfies ',predicate) forms))
(let ((pos 0) (descp descs)) (let ((pos 0) (descp descs))
(while descp (while descp
(let* ((desc (pop descp)) (let* ((desc (pop descp))
@ -2768,14 +2776,6 @@ non-nil value, that slot cannot be set via `setf'.
(setq pos (1+ pos)))) (setq pos (1+ pos))))
(setq slots (nreverse slots) (setq slots (nreverse slots)
defaults (nreverse defaults)) defaults (nreverse defaults))
(when pred-form
(push `(cl-defsubst ,predicate (cl-x)
(declare (side-effect-free error-free))
,(if (eq (car pred-form) 'and)
(append pred-form '(t))
`(and ,pred-form t)))
forms)
(push `(put ',name 'cl-deftype-satisfies ',predicate) forms))
(and copier (and copier
(push `(defalias ',copier #'copy-sequence) forms)) (push `(defalias ',copier #'copy-sequence) forms))
(if constructor (if constructor

View file

@ -125,7 +125,7 @@ from executing while Emacs is redisplaying."
'eshell-kill-append) t) 'eshell-kill-append) t)
("/dev/clip" (lambda (mode) ("/dev/clip" (lambda (mode)
(if (eq mode 'overwrite) (if (eq mode 'overwrite)
(let ((gui-select-enable-clipboard t)) (let ((select-enable-clipboard t))
(kill-new ""))) (kill-new "")))
'eshell-clipboard-append) t)) 'eshell-clipboard-append) t))
"Map virtual devices name to Emacs Lisp functions. "Map virtual devices name to Emacs Lisp functions.
@ -325,7 +325,7 @@ last execution result should not be changed."
(defun eshell-clipboard-append (string) (defun eshell-clipboard-append (string)
"Call `kill-append' with STRING, if it is indeed a string." "Call `kill-append' with STRING, if it is indeed a string."
(if (stringp string) (if (stringp string)
(let ((gui-select-enable-clipboard t)) (let ((select-enable-clipboard t))
(kill-append string nil)))) (kill-append string nil))))
(defun eshell-get-target (target &optional mode) (defun eshell-get-target (target &optional mode)

View file

@ -713,7 +713,11 @@ decoded by the coding system itself and before any functions in
`after-insert-functions' are called. This function is passed one `after-insert-functions' are called. This function is passed one
argument: the number of characters in the text to convert, with argument: the number of characters in the text to convert, with
point at the start of the text. The function should leave point point at the start of the text. The function should leave point
unchanged, and should return the new character count. unchanged, and should return the new character count. Note that
this function should avoid reading from files or receiving text
from subprocesses -- anything that could invoke decoding; if it
must do so, it should bind `coding-system-for-read' to a value
other than the current coding-system, to avoid infinite recursion.
`:pre-write-conversion' `:pre-write-conversion'
@ -722,7 +726,12 @@ VALUE must be a function to call after all functions in
called, and before the text is encoded by the coding system called, and before the text is encoded by the coding system
itself. This function should convert the whole text in the itself. This function should convert the whole text in the
current buffer. For backward compatibility, this function is current buffer. For backward compatibility, this function is
passed two arguments which can be ignored. passed two arguments which can be ignored. Note that this
function should avoid writing to files or sending text to
subprocesses -- anything that could invoke encoding; if it
must do so, it should bind `coding-system-for-write' to a
value other than the current coding-system, to avoid infinite
recursion.
`:default-char' `:default-char'

View file

@ -530,14 +530,10 @@
(gui-backend-selection-exists-p 'CLIPBOARD)) (gui-backend-selection-exists-p 'CLIPBOARD))
(not buffer-read-only))))) (not buffer-read-only)))))
(defvar gui-select-enable-clipboard)
(defun clipboard-yank () (defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text." "Insert the clipboard contents, or the last stretch of killed text."
(interactive "*") (interactive "*")
(let ((gui-select-enable-clipboard t) (let ((select-enable-clipboard t))
(interprogram-paste-function (or interprogram-paste-function
#'gui-selection-value)))
(yank))) (yank)))
(defun clipboard-kill-ring-save (beg end &optional region) (defun clipboard-kill-ring-save (beg end &optional region)
@ -545,9 +541,7 @@
If the optional argument REGION is non-nil, the function ignores If the optional argument REGION is non-nil, the function ignores
BEG and END, and saves the current region instead." BEG and END, and saves the current region instead."
(interactive "r\np") (interactive "r\np")
(let ((gui-select-enable-clipboard t) (let ((select-enable-clipboard t))
(interprogram-cut-function (or interprogram-cut-function
#'gui-select-text)))
(kill-ring-save beg end region))) (kill-ring-save beg end region)))
(defun clipboard-kill-region (beg end &optional region) (defun clipboard-kill-region (beg end &optional region)
@ -555,9 +549,7 @@ BEG and END, and saves the current region instead."
If the optional argument REGION is non-nil, the function ignores If the optional argument REGION is non-nil, the function ignores
BEG and END, and kills the current region instead." BEG and END, and kills the current region instead."
(interactive "r\np") (interactive "r\np")
(let ((gui-select-enable-clipboard t) (let ((select-enable-clipboard t))
(interprogram-cut-function (or interprogram-cut-function
#'gui-select-text)))
(kill-region beg end region))) (kill-region beg end region)))
(defun menu-bar-enable-clipboard () (defun menu-bar-enable-clipboard ()

View file

@ -1852,7 +1852,8 @@ nil."
"Helper function for `js--proper-indentation'. "Helper function for `js--proper-indentation'.
Return the proper indentation of the current line if it belongs to a declaration Return the proper indentation of the current line if it belongs to a declaration
statement spanning multiple lines; otherwise, return nil." statement spanning multiple lines; otherwise, return nil."
(let (at-opening-bracket) (let (forward-sexp-function ; Use Lisp version.
at-opening-bracket)
(save-excursion (save-excursion
(back-to-indentation) (back-to-indentation)
(when (not (looking-at js--declaration-keyword-re)) (when (not (looking-at js--declaration-keyword-re))
@ -1929,6 +1930,7 @@ indentation is aligned to that column."
(let ((bracket (nth 1 parse-status)) (let ((bracket (nth 1 parse-status))
declaration-keyword-end declaration-keyword-end
at-closing-bracket-p at-closing-bracket-p
forward-sexp-function ; Use Lisp version.
comma-p) comma-p)
(when (looking-at js--declaration-keyword-re) (when (looking-at js--declaration-keyword-re)
(setq declaration-keyword-end (match-end 0)) (setq declaration-keyword-end (match-end 0))

View file

@ -263,7 +263,7 @@ Consult the selection. Treat empty strings as if they were unset."
(if (w16-selection-owner-p selection) (if (w16-selection-owner-p selection)
t) t)
;; FIXME: Other systems don't obey ;; FIXME: Other systems don't obey
;; gui-select-enable-clipboard here. ;; select-enable-clipboard here.
(with-demoted-errors "w16-set-clipboard-data: %S" (with-demoted-errors "w16-set-clipboard-data: %S"
(w16-set-clipboard-data value)) (w16-set-clipboard-data value))
value)) value))

View file

@ -2625,7 +2625,7 @@ temporarily reverses the meaning of this variable."
(defun ediff-janitor (ask keep-variants) (defun ediff-janitor (ask keep-variants)
"Kill buffers A, B, and, possibly, C, if these buffers aren't modified. "Kill buffers A, B, and, possibly, C, if these buffers aren't modified.
In merge jobs, buffer C is not deleted here, but rather according to In merge jobs, buffer C is not deleted here, but rather according to
ediff-quit-merge-hook. `ediff-quit-merge-hook'.
ASK non-nil means ask the user whether to keep each unmodified buffer, unless ASK non-nil means ask the user whether to keep each unmodified buffer, unless
KEEP-VARIANTS is non-nil, in which case buffers are never killed. KEEP-VARIANTS is non-nil, in which case buffers are never killed.
A side effect of cleaning up may be that you should be careful when comparing A side effect of cleaning up may be that you should be careful when comparing

View file

@ -1029,6 +1029,8 @@ or BRANCH^ (where \"^\" can be repeated)."
(buffer-string)))) (buffer-string))))
(defun vc-git-region-history (file buffer lfrom lto) (defun vc-git-region-history (file buffer lfrom lto)
"Insert into BUFFER the history of FILE for lines LFROM to LTO.
This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
;; The "git log" command below interprets the line numbers as applying ;; The "git log" command below interprets the line numbers as applying
;; to the HEAD version of the file, not to the current state of the file. ;; to the HEAD version of the file, not to the current state of the file.
;; So we need to look at all the local changes and adjust lfrom/lto ;; So we need to look at all the local changes and adjust lfrom/lto

View file

@ -101,7 +101,6 @@ while [ $# -gt 0 ]; do
clean_up=yes clean_up=yes
make_tar=yes make_tar=yes
update=no update=no
check=no
;; ;;
## Include the test/ directory. ## Include the test/ directory.
@ -211,6 +210,11 @@ them, and try again." >&2
fi fi
if [ $check = yes ]; then if [ $check = yes ]; then
echo "Sanity checking (use --no-check to disable this)..."
error=no
ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \ ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el
@ -224,6 +228,7 @@ if [ $check = yes ]; then
bogosities=`comm -13 /tmp/elelc /tmp/elc` bogosities=`comm -13 /tmp/elelc /tmp/elc`
if [ x"${bogosities}" != x"" ]; then if [ x"${bogosities}" != x"" ]; then
error=yes
echo "The following .elc files have no corresponding .el files:" echo "The following .elc files have no corresponding .el files:"
echo "${bogosities}" echo "${bogosities}"
fi fi
@ -232,6 +237,19 @@ if [ $check = yes ]; then
sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel
losers=`comm -23 /tmp/el /tmp/elcel` losers=`comm -23 /tmp/el /tmp/elcel`
bogosities=
while read elc; do
el=`echo $elc | sed 's/c$//'`
[ -e $el ] || continue
[ $elc -nt $el ] || bogosities="$bogosities $elc"
done < /tmp/elc
if [ x"${bogosities}" != x"" ]; then
error=yes
echo "The following .elc files are older than their .el files:"
echo "${bogosities}"
fi
rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc
bogosities= bogosities=
@ -245,9 +263,45 @@ if [ $check = yes ]; then
done done
if [ x"${bogosities}" != x"" ]; then if [ x"${bogosities}" != x"" ]; then
error=yes
echo "The following .el files have no corresponding .elc files:" echo "The following .el files have no corresponding .elc files:"
echo "${bogosities}" echo "${bogosities}"
fi fi
## This is only a crude check, eg it does not handle .info
## files with multiple .texi source files.
find doc -name '*.texi' > /tmp/el
bogosities=
while read texi; do
info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'`
[ x"${info}" != x"" ] || continue
info=info/$info
[ -e $info ] || continue
[ $info -nt $texi ] || bogosities="$bogosities $info"
done < /tmp/el
rm -f /tmp/el
if [ x"${bogosities}" != x"" ]; then
error=yes
echo "The following .info files are older than their .texi files:"
echo "${bogosities}"
fi
## This exits with non-zero status if any .info files need
## rebuilding.
if [ -e Makefile ]; then
echo "Checking to see if info files are up-to-date..."
make --question info || error=yes
fi
if [ $error = yes ]; then
echo "Failed checks" >&2
exit 1
fi
fi fi
if [ $update = yes ]; then if [ $update = yes ]; then