[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 33e8116 3/3: Merge from origin/emacs-27
From: |
Glenn Morris |
Subject: |
master 33e8116 3/3: Merge from origin/emacs-27 |
Date: |
Sat, 7 Nov 2020 12:58:10 -0500 (EST) |
branch: master
commit 33e8116fc2c24b14d30c08a09cc034bea6f9d584
Merge: 1de0044 f5d7fb3
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Merge from origin/emacs-27
f5d7fb3a2d (origin/emacs-27) Fix 'uudecode-decode-region-internal' in...
d4242177da Fix 'send-string-to-terminal' writing very long strings
9da0f4026c * lisp/subr.el (read-char-from-minibuffer): Doc fix. (Bug...
9899f74e4e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
a6fcba783e Fix documentation of 'windmove-swap-states-default-keybind...
f4acd7a924 Split windows evenly when 'min-margins' parameter was set ...
---
doc/emacs/windows.texi | 4 ++--
lisp/mail/uudecode.el | 36 +++++++++++++++++-------------------
lisp/subr.el | 12 +++++++-----
lisp/window.el | 8 +++++++-
src/dispnew.c | 4 ++++
5 files changed, 37 insertions(+), 27 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/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/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/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/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;
}