[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b83e31b 3/4: Merge branch 'master' of git.savannah.gnu.org:/srv/g
From: |
Eli Zaretskii |
Subject: |
master b83e31b 3/4: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs |
Date: |
Mon, 9 Nov 2020 09:57:15 -0500 (EST) |
branch: master
commit b83e31bf9561f05204f503236373cbef14d61012
Merge: 7be8d8a cfe8a73
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
doc/emacs/windows.texi | 4 ++--
doc/misc/widget.texi | 19 ++++++++++++++++---
lisp/gnus/gnus-group.el | 4 ++++
lisp/gnus/gnus-search.el | 8 ++++----
lisp/international/mule.el | 11 +++++++++--
lisp/mail/uudecode.el | 36 +++++++++++++++++-------------------
lisp/net/eww.el | 2 +-
lisp/subr.el | 12 +++++++-----
lisp/vc/vc.el | 4 ++--
lisp/window.el | 8 +++++++-
src/bidi.c | 12 ++++++++++++
src/dispnew.c | 4 ++++
src/minibuf.c | 4 ----
src/w32fns.c | 27 +++++++++++++++------------
14 files changed, 100 insertions(+), 55 deletions(-)
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index bc1dcd7..07f8269 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -589,7 +589,7 @@ buffer. @xref{Follow Mode}.
@findex windmove-default-keybindings
@findex windmove-display-default-keybindings
@findex windmove-delete-default-keybindings
-@findex windmove-swap-states-in-direction
+@findex windmove-swap-states-default-keybindings
The Windmove package defines commands for moving directionally
between neighboring windows in a frame. @kbd{M-x windmove-right}
selects the window immediately to the right of the currently selected
@@ -603,7 +603,7 @@ keybindings for commands that specify in what direction to
display the
window for the buffer that the next command is going to display.
Also there is @w{@kbd{M-x windmove-delete-default-keybindings}} to
define keybindings for commands that delete windows directionally, and
-@w{@kbd{M-x windmove-swap-states-in-direction}} that define
+@w{@kbd{M-x windmove-swap-states-default-keybindings}} that defines
keybindings for commands that swap the window contents of the selected
window with the window in the specified direction.
diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi
index 3ce27a1..83a6c4c 100644
--- a/doc/misc/widget.texi
+++ b/doc/misc/widget.texi
@@ -484,9 +484,21 @@ are interpreted in a widget specific way.
The following keyword arguments apply to all widgets:
@table @code
+@cindex internal format
+@cindex external format
@vindex value@r{ keyword}
@item :value
-The initial value for widgets of this type.
+The initial value for widgets of this type. Typically, a widget
+represents its value in two formats: external and internal. The
+external format is the value as the rest of Emacs sees it, and the
+internal format is a representation that the widget defines and uses
+in a widget specific way.
+
+Both formats might be the same for certain widgets and might differ
+for others, and there is no guarantee about which format the value
+stored in the @code{:value} property has. However, when creating a
+widget or defining a new one (@pxref{Defining New Widgets}), the
+@code{:value} should be in the external format.
@vindex format@r{ keyword}
@item :format
@@ -629,8 +641,9 @@ representation of the @code{:value} property if not.
@vindex match@r{ keyword}
@item :match
-Should be a function called with two arguments, the widget and a value,
-and returning non-@code{nil} if the widget can represent the specified value.
+Should be a function called with two arguments, the widget and an
+external value, and should return non-@code{nil} if the widget can
+represent the specified value.
@vindex validate@r{ keyword}
@item :validate
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index c6f7e1c..9db0e18 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -3186,6 +3186,7 @@ non-nil SPECS arg must be an alist with
`search-query-spec' and
(let* ((group-spec
(or
(cdr (assq 'search-group-spec specs))
+ (cdr (assq 'nnir-group-spec specs))
(if (gnus-server-server-name)
(list (list (gnus-server-server-name)))
(seq-group-by
@@ -3198,6 +3199,7 @@ non-nil SPECS arg must be an alist with
`search-query-spec' and
(query-spec
(or
(cdr (assq 'search-query-spec specs))
+ (cdr (assq 'nnir-query-spec specs))
(gnus-search-make-spec no-parse))))
(gnus-group-make-group
name
@@ -3229,6 +3231,7 @@ non-nil SPECS arg must be an alist with
`search-query-spec' and
(interactive "P")
(let* ((group-spec
(or (cdr (assq 'search-group-spec specs))
+ (cdr (assq 'nnir-group-spec specs))
(if (gnus-server-server-name)
(list (list (gnus-server-server-name)))
(seq-group-by
@@ -3240,6 +3243,7 @@ non-nil SPECS arg must be an alist with
`search-query-spec' and
(assoc (gnus-group-topic-name) gnus-topic-alist))))))))
(query-spec
(or (cdr (assq 'search-query-spec specs))
+ (cdr (assq 'nnir-query-spec specs))
(gnus-search-make-spec no-parse))))
(gnus-group-read-ephemeral-group
(concat "nnselect-" (message-unique-id))
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 07bd2bc..abee7c4 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -782,8 +782,7 @@ the files in ARTLIST by that search key.")
(cl-defmethod shared-initialize ((engine gnus-search-process)
slots)
(setq slots (plist-put slots :proc-buffer
- (get-buffer-create
- (generate-new-buffer-name " *gnus-search-"))))
+ (generate-new-buffer " *gnus-search-")))
(cl-call-next-method engine slots))
(defclass gnus-search-imap (gnus-search-engine)
@@ -1995,7 +1994,7 @@ remaining string, then adds all that to the top-level
spec."
(nnheader-message
5 "Invalid search engine parameter: (%s %s)"
key value)))))
- (nnheader-message 5 "No search engine defined for %s" srv))
+ (error "No search engine defined for %S" method))
inst))
(declare-function gnus-registry-get-id-key "gnus-registry" (id key))
@@ -2127,7 +2126,8 @@ article came from is also searched."
(minibuffer-with-setup-hook
(lambda ()
(add-hook 'completion-at-point-functions
- #'gnus-search--complete-key-data))
+ #'gnus-search--complete-key-data
+ nil t))
(read-from-minibuffer
"Query: " nil gnus-search-minibuffer-map
nil 'gnus-search-history)))
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index ad9c3a2..212e723 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -857,16 +857,23 @@ as an encoding result.
`:inhibit-null-byte-detection'
-VALUE non-nil means Emacs ignore null bytes on code detection.
+VALUE non-nil means Emacs should ignore null bytes on code detection.
See the variable `inhibit-null-byte-detection'. This attribute
is meaningful only when `:coding-type' is `undecided'.
+If VALUE is t, Emacs will ignore null bytes unconditionally while
+detecting encoding. If VALUE is non-nil and not t, Emacs will
+ignore null bytes if `inhibit-null-byte-detection' is non-nil.
`:inhibit-iso-escape-detection'
-VALUE non-nil means Emacs ignores ISO-2022 escape sequences on
+VALUE non-nil means Emacs should ignore ISO-2022 escape sequences on
code detection. See the variable `inhibit-iso-escape-detection'.
This attribute is meaningful only when `:coding-type' is
`undecided'.
+If VALUE is t, Emacs will ignore escape sequences unconditionally
+while detecting encoding. If VALUE is non-nil and not t, Emacs
+will ignore escape sequences if `inhibit-iso-escape-detection' is
+non-nil.
`:prefer-utf-8'
diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el
index bcbd571..0dce9b7 100644
--- a/lisp/mail/uudecode.el
+++ b/lisp/mail/uudecode.el
@@ -149,12 +149,10 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
(setq counter (1+ counter)
inputpos (1+ inputpos))
(cond ((= counter 4)
- (setq result (cons
- (concat
- (char-to-string (ash bits -16))
- (char-to-string (logand (ash bits -8) 255))
- (char-to-string (logand bits 255)))
- result))
+ (setq result (cons (logand bits 255)
+ (cons (logand (ash bits -8) 255)
+ (cons (ash bits -16)
+ result))))
(setq bits 0 counter 0))
(t (setq bits (ash bits 6)))))))
(cond
@@ -166,26 +164,26 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
;;(error "uucode ends unexpectedly")
(setq done t))
((= counter 3)
- (setq result (cons
- (concat
- (char-to-string (logand (ash bits -16) 255))
- (char-to-string (logand (ash bits -8) 255)))
- result)))
+ (setq result (cons (logand (ash bits -8) 255)
+ (cons (logand (ash bits -16) 255)
+ result))))
((= counter 2)
- (setq result (cons
- (char-to-string (logand (ash bits -10) 255))
- result))))
+ (setq result (cons (logand (ash bits -10) 255)
+ result))))
(skip-chars-forward non-data-chars end))
(if file-name
(with-temp-file file-name
(set-buffer-multibyte nil)
- (insert (apply #'concat (nreverse result))))
+ (apply #'insert (nreverse result)))
(or (markerp end) (setq end (set-marker (make-marker) end)))
(goto-char start)
- (if enable-multibyte-characters
- (dolist (x (nreverse result))
- (insert (decode-coding-string x 'binary)))
- (insert (apply #'concat (nreverse result))))
+ (apply #'insert
+ (nreverse
+ (if enable-multibyte-characters
+ (mapcar (lambda (ch)
+ (or (decode-char 'eight-bit ch) ch))
+ result)
+ result)))
(delete-region (point) end))))))
;;;###autoload
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 43405fb..9ed01ec 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -420,7 +420,7 @@ killed after rendering."
(narrow-to-region start end)
(goto-char start)
(let ((case-fold-search t))
- (while (re-search-forward "<[^0-9a-z!/]" nil t)
+ (while (re-search-forward "<[^0-9a-z!?/]" nil t)
(goto-char (match-beginning 0))
(delete-region (point) (1+ (point)))
(insert "<"))))))
diff --git a/lisp/subr.el b/lisp/subr.el
index 286851d..924526d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2767,12 +2767,14 @@ Also discard all previous input in the minibuffer."
(defvar empty-history)
(defun read-char-from-minibuffer (prompt &optional chars history)
- "Read a character from the minibuffer, prompting for PROMPT.
+ "Read a character from the minibuffer, prompting for it with PROMPT.
Like `read-char', but uses the minibuffer to read and return a character.
-When CHARS is non-nil, any input that is not one of CHARS is ignored.
-When HISTORY is a symbol, then allows navigating in a history.
-The navigation commands are `M-p' and `M-n', with `RET' to select
-a character from history."
+Optional argument CHARS, if non-nil, should be a list of characters;
+the function will ignore any input that is not one of CHARS.
+Optional argument HISTORY, if non-nil, should be a symbol that
+specifies the history list variable to use for navigating in input
+history using `M-p' and `M-n', with `RET' to select a character from
+history."
(let* ((empty-history '())
(map (if (consp chars)
(or (gethash chars read-char-from-minibuffer-map-hash)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 8def7da..83f2596 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1045,7 +1045,7 @@ requesting the fileset doesn't intend to change the VC
state,
such as when printing the log or showing the diffs.
If the current buffer is in `vc-dir' or Dired mode, FILESET is the
-list of marked files, or the current directory if no files are
+list of marked files, or the file under point if no files are
marked.
Otherwise, if the current buffer is visiting a version-controlled
file or is an indirect buffer whose base buffer visits a
@@ -1391,7 +1391,7 @@ first backend that could register the file is used."
(unless fname
(setq fname buffer-file-name))
(when (vc-call-backend backend 'registered fname)
- (error "This file is already registered"))
+ (error "This file is already registered: %s" fname))
;; Watch out for new buffers of size 0: the corresponding file
;; does not exist yet, even though buffer-modified-p is nil.
(when bname
diff --git a/lisp/window.el b/lisp/window.el
index 865f6fd..d564ec5 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5488,7 +5488,13 @@ frame. The selected window is not changed by this
function."
(set-window-parameter (window-parent new) 'window-atom t))
(set-window-parameter new 'window-atom t)))
- ;; Sanitize sizes unless SIZE was specified.
+ ;; Make the new window inherit the `min-margins' parameter of
+ ;; WINDOW (Bug#44483).
+ (let ((min-margins (window-parameter window 'min-margins)))
+ (when min-margins
+ (set-window-parameter new 'min-margins min-margins)))
+
+ ;; Sanitize sizes unless SIZE was specified.
(unless size
(window--sanitize-window-sizes horizontal))
diff --git a/src/bidi.c b/src/bidi.c
index 225b27b..ef062ad 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1460,6 +1460,11 @@ bidi_at_paragraph_end (ptrdiff_t charpos, ptrdiff_t
bytepos)
else
start_re = paragraph_start_re;
+ /* Prevent quitting inside re_match_2, as redisplay_window could
+ have temporarily moved point. */
+ ptrdiff_t count = SPECPDL_INDEX ();
+ specbind (Qinhibit_quit, Qt);
+
val = fast_looking_at (sep_re, charpos, bytepos, ZV, ZV_BYTE, Qnil);
if (val < 0)
{
@@ -1469,6 +1474,7 @@ bidi_at_paragraph_end (ptrdiff_t charpos, ptrdiff_t
bytepos)
val = -2;
}
+ unbind_to (count, Qnil);
return val;
}
@@ -1544,6 +1550,11 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t
pos_byte)
if (cache_buffer->base_buffer)
cache_buffer = cache_buffer->base_buffer;
+ /* Prevent quitting inside re_match_2, as redisplay_window could
+ have temporarily moved point. */
+ ptrdiff_t count = SPECPDL_INDEX ();
+ specbind (Qinhibit_quit, Qt);
+
while (pos_byte > BEGV_BYTE
&& n++ < MAX_PARAGRAPH_SEARCH
&& fast_looking_at (re, pos, pos_byte, limit, limit_byte, Qnil) < 0)
@@ -1561,6 +1572,7 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t
pos_byte)
else
pos = find_newline_no_quit (pos, pos_byte, -1, &pos_byte);
}
+ unbind_to (count, Qnil);
if (n >= MAX_PARAGRAPH_SEARCH)
pos = BEGV, pos_byte = BEGV_BYTE;
if (bpc)
diff --git a/src/dispnew.c b/src/dispnew.c
index 3f2ae3e..48a36f2 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5904,8 +5904,12 @@ when TERMINAL is nil. */)
}
out = tty->output;
}
+ /* STRING might be very long, in which case fwrite could be
+ interrupted by SIGIO. So we temporarily block SIGIO. */
+ unrequest_sigio ();
fwrite (SDATA (string), 1, SBYTES (string), out);
fflush (out);
+ request_sigio ();
unblock_input ();
return Qnil;
}
diff --git a/src/minibuf.c b/src/minibuf.c
index 068086e..8c19559 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -142,10 +142,6 @@ void move_minibuffer_onto_frame (void)
set_window_buffer (sf->minibuffer_window, buffer, 0, 0);
minibuf_window = sf->minibuffer_window;
- if (EQ (XWINDOW (minibuf_window)->frame, selected_frame))
- /* The minibuffer might be on another frame. */
- Fset_frame_selected_window (selected_frame, sf->minibuffer_window,
- Qnil);
set_window_buffer (of->minibuffer_window, get_minibuffer (0), 0, 0);
}
}
diff --git a/src/w32fns.c b/src/w32fns.c
index ef69f40..7bb9689 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -8498,8 +8498,8 @@ DEFUN ("w32-register-hot-key", Fw32_register_hot_key,
doc: /* Register KEY as a hot-key combination.
Certain key combinations like Alt-Tab and Win-R are reserved for
system use on Windows, and therefore are normally intercepted by the
-system. These key combinations can be received by registering them
-as hot-keys, except for Win-L which always locks the computer.
+system. These key combinations can be used in Emacs by registering
+them as hot-keys, except for Win-L which always locks the computer.
On Windows 98 and ME, KEY must be a one element key definition in
vector form that would be acceptable to `define-key' (e.g. [A-tab] for
@@ -8508,16 +8508,19 @@ Alt-Tab). The meta modifier is interpreted as Alt if
modifier keys. The return value is the hotkey-id if registered,
otherwise nil.
-On Windows versions since NT, KEY can also be specified as [M-], [s-] or
-[h-] to indicate that all combinations of that key should be processed
-by Emacs instead of the operating system. The super and hyper
-modifiers are interpreted according to the current values of
-`w32-lwindow-modifier' and `w32-rwindow-modifier'. For instance,
-setting `w32-lwindow-modifier' to `super' and then calling
-`(w32-register-hot-key [s-])' grabs all combinations of the left Windows
-key to Emacs, but leaves the right Windows key free for the operating
-system keyboard shortcuts. The return value is t if the call affected
-any key combinations, otherwise nil. */)
+On Windows versions since NT, KEY can also be specified as just a
+modifier key, [M-], [s-] or [H-], to indicate that all combinations
+of the respective modifier key should be processed by Emacs instead
+of the operating system. The super and hyper modifiers are
+interpreted according to the current values of `w32-lwindow-modifier'
+and `w32-rwindow-modifier'. For instance, setting `w32-lwindow-modifier'
+to `super' and then calling `(w32-register-hot-key [s-])' grabs all
+combinations of the left Windows key to Emacs as keys with the Super
+modifier, but leaves the right Windows key free for the operating
+system keyboard shortcuts.
+
+The return value is t if the call affected any key combinations,
+otherwise nil. */)
(Lisp_Object key)
{
key = w32_parse_and_hook_hot_key (key, 1);