1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

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 ...
This commit is contained in:
Glenn Morris 2020-11-07 09:57:56 -08:00
commit 33e8116fc2
5 changed files with 37 additions and 27 deletions

View File

@ -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.

View File

@ -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

View File

@ -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)

View File

@ -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))

View File

@ -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;
}