Merge from origin/emacs-26

ca3f0a8 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs...
99f92da Improve documentation of 'directory-files-and-attributes'
df8649a * lisp/gnus/message.el (message-remove-header): Don't remove ...
b682a7e ; * etc/NEWS: Add headings for Emacs 26.2
aa175a4 Adapt hexl-mode to native line-number display
b8e7749 Fix example in Tramp manual
f212fe5 Handle case where Xft is found but not XRender
186280f * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh...
24ba633 Improve read-multiple-choice docstring (Bug#31628)

Conflicts:
	etc/NEWS
	src/dired.c
This commit is contained in:
Glenn Morris 2018-06-02 10:25:50 -07:00
commit 42a851c634
8 changed files with 85 additions and 25 deletions

View file

@ -3257,8 +3257,8 @@ if test "${HAVE_X11}" = "yes"; then
if test "x${with_xft}" != "xno"; then if test "x${with_xft}" != "xno"; then
EMACS_CHECK_MODULES([XFT], [xft >= 0.13.0], [], [HAVE_XFT=no]) EMACS_CHECK_MODULES([XFT], [xft >= 0.13.0], [], [HAVE_XFT=no])
## Because xftfont.c uses XRenderQueryExtension, we also ## Because xterm.c uses XRenderQueryExtension when XFT is
## need to link to -lXrender. ## enabled, we also need to link to -lXrender.
HAVE_XRENDER=no HAVE_XRENDER=no
AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes) AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes)
if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
@ -3281,6 +3281,9 @@ if test "${HAVE_X11}" = "yes"; then
CPPFLAGS=$OLD_CPPFLAGS CPPFLAGS=$OLD_CPPFLAGS
CFLAGS=$OLD_CFLAGS CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS LIBS=$OLD_LIBS
else
# Make sure XFT is disabled if we found XFT but not XRender
HAVE_XFT=no
fi # "$HAVE_XFT" != no fi # "$HAVE_XFT" != no
fi # "x${with_xft}" != "xno" fi # "x${with_xft}" != "xno"

View file

@ -2915,8 +2915,8 @@ are included.
This is similar to @code{directory-files} in deciding which files This is similar to @code{directory-files} in deciding which files
to report on and how to report their names. However, instead to report on and how to report their names. However, instead
of returning a list of file names, it returns for each file a of returning a list of file names, it returns for each file a
list @code{(@var{filename} . @var{attributes})}, where @var{attributes} list @code{(@var{filename} @var{attributes})}, where @var{attributes}
is what @code{file-attributes} would return for that file. is what @code{file-attributes} returns for that file.
The optional argument @var{id-format} has the same meaning as the The optional argument @var{id-format} has the same meaning as the
corresponding argument to @code{file-attributes} (@pxref{Definition corresponding argument to @code{file-attributes} (@pxref{Definition
of file-attributes}). of file-attributes}).

View file

@ -3425,6 +3425,11 @@ following line to @file{~/.zshrc}:
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
@end example @end example
This uses the default value of @code{tramp-terminal-type},
@samp{"dumb"}, as value of the @env{TERM} environment variable. If
you want to use another value for @env{TERM}, change
@code{tramp-terminal-type} and this line accordingly.
When using fish shell on remote hosts, disable fancy formatting by When using fish shell on remote hosts, disable fancy formatting by
adding the following to @file{~/.config/fish/config.fish}: adding the following to @file{~/.config/fish/config.fish}:

View file

@ -15,6 +15,51 @@ in older Emacs versions.
You can narrow news to a specific version by calling 'view-emacs-news' You can narrow news to a specific version by calling 'view-emacs-news'
with a prefix argument or by typing C-u C-h C-n. with a prefix argument or by typing C-u C-h C-n.
* Installation Changes in Emacs 26.2
---
** Building Emacs with the '--with-xwidgets' option now requires WebKit2
To build Emacs with xwidgets support, you will need to install the
webkit2gtk-4.0 package; version 2.12 or later is required.
(This change was actually made in Emacs 26.1, but was not called out
in its NEWS.)
* Startup Changes in Emacs 26.2
* Changes in Emacs 26.2
* Editing Changes in Emacs 26.2
* Changes in Specialized Modes and Packages in Emacs 26.2
** Shell mode
---
*** Shell mode buffers now have 'scroll-conservatively' set to 101.
This is so as to better emulate the scrolling behavior of a text
terminal when new output is added to the screen buffer. To get back
the previous behavior, reset 'scroll-conservatively' to zero (or any
other value you like) in a function and add it to 'shell-mode-hook'.
(This change was actually made in Emacs 26.1, but was not called out
in its NEWS.)
* New Modes and Packages in Emacs 26.2
* Incompatible Lisp Changes in Emacs 26.2
* Lisp Changes in Emacs 26.2
* Changes in Emacs 26.2 on Non-Free Operating Systems
* Installation Changes in Emacs 26.1 * Installation Changes in Emacs 26.1

View file

@ -30,12 +30,12 @@
"Ask user a multiple choice question. "Ask user a multiple choice question.
PROMPT should be a string that will be displayed as the prompt. PROMPT should be a string that will be displayed as the prompt.
CHOICES is an alist where the first element in each entry is a CHOICES is a list of (KEY NAME [DESCRIPTION]). KEY is a
character to be entered, the second element is a short name for character to be entered. NAME is a short name for the entry to
the entry to be displayed while prompting (if there's room, it be displayed while prompting (if there's room, it might be
might be shortened), and the third, optional entry is a longer shortened). DESCRIPTION is an optional longer explanation that
explanation that will be displayed in a help buffer if the user will be displayed in a help buffer if the user requests more
requests more help. help.
This function translates user input into responses by consulting This function translates user input into responses by consulting
the bindings in `query-replace-map'; see the documentation of the bindings in `query-replace-map'; see the documentation of
@ -46,9 +46,9 @@ perform the requested window recentering or scrolling and ask
again. again.
When `use-dialog-box' is t (the default), this function can pop When `use-dialog-box' is t (the default), this function can pop
up a dialog window to collect the user input. That functionality up a dialog window to collect the user input. That functionality
requires `display-popup-menus-p' to return t. Otherwise, a text requires `display-popup-menus-p' to return t. Otherwise, a
dialog will be used. text dialog will be used.
The return value is the matching entry from the CHOICES list. The return value is the matching entry from the CHOICES list.

View file

@ -2422,7 +2422,9 @@ Return the number of headers removed."
(while (and (not (eobp)) (while (and (not (eobp))
(not last)) (not last))
(if (if reverse (if (if reverse
(not (looking-at regexp)) (and (not (looking-at regexp))
;; Don't remove things not looking like header.
(looking-at "[!-9;-~]+:"))
(looking-at regexp)) (looking-at regexp))
(progn (progn
(cl-incf number) (cl-incf number)

View file

@ -1104,8 +1104,15 @@ This function is assumed to be used as callback function for `hl-line-mode'."
"Return a string ruler for Hexl mode." "Return a string ruler for Hexl mode."
(let* ((highlight (mod (hexl-current-address) 16)) (let* ((highlight (mod (hexl-current-address) 16))
(s (cdr (assq hexl-bits hexl-rulers))) (s (cdr (assq hexl-bits hexl-rulers)))
(pos 0)) (pos 0)
(lnum-width
(if display-line-numbers
(round (line-number-display-width 'columns))
0)))
(set-text-properties 0 (length s) nil s) (set-text-properties 0 (length s) nil s)
(when (> lnum-width 0)
(setq s (concat (make-string lnum-width ? ) s))
(setq pos (+ pos lnum-width)))
;; Turn spaces in the header into stretch specs so they work ;; Turn spaces in the header into stretch specs so they work
;; regardless of the header-line face. ;; regardless of the header-line face.
(while (string-match "[ \t]+" s pos) (while (string-match "[ \t]+" s pos)
@ -1116,10 +1123,11 @@ This function is assumed to be used as callback function for `hl-line-mode'."
s)) s))
;; Highlight the current column. ;; Highlight the current column.
(let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) ) (let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) )
(if (> lnum-width 0) (setq offset (+ offset lnum-width)))
(put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s)) (put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s))
;; Highlight the current ascii column ;; Highlight the current ascii column
(put-text-property (+ (hexl-ascii-start-column) highlight 1) (put-text-property (+ (hexl-ascii-start-column) lnum-width highlight 1)
(+ (hexl-ascii-start-column) highlight 2) (+ (hexl-ascii-start-column) lnum-width highlight 2)
'face 'highlight s) 'face 'highlight s)
s)) s))

View file

@ -358,17 +358,14 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes,
Sdirectory_files_and_attributes, 1, 5, 0, Sdirectory_files_and_attributes, 1, 5, 0,
doc: /* Return a list of names of files and their attributes in DIRECTORY. doc: /* Return a list of names of files and their attributes in DIRECTORY.
The list returned has elements that contain the data from Value is a list of the form:
`file-attributes' for each file -- with the file name prepended. So
the structure of each element is
`(FILE-NAME FILE-ATTRIBUTE1 FILE-ATTRIBUTE2 ...)'.
For instance, to get the size of the fourth element in a directory, ((FILE1 FILE1-ATTRS) (FILE2 FILE2-ATTRS) ...)
you could say:
(file-attribute-size (cdr (nth 3 (directory-files-and-attributes "/")))) where each FILEn-ATTRS is the attributes of FILEn as returned
by `file-attributes'.
There are four optional arguments: This function accepts four optional arguments:
If FULL is non-nil, return absolute file names. Otherwise return names If FULL is non-nil, return absolute file names. Otherwise return names
that are relative to the specified directory. that are relative to the specified directory.
If MATCH is non-nil, mention only file names that match the regexp MATCH. If MATCH is non-nil, mention only file names that match the regexp MATCH.