1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

Merge from origin/emacs-27

488204cdc6 (origin/emacs-27) Remove one of recently added warnings ab...
55bc1560ac Fix assertion failure in window_box_height (Bug#45737)
27743e9e70 Fix cl-concatenate inlining
32a3758c84 Fix infloop in 'pixel-scroll-mode'
74d18957b8 Fix inhibiting the default.el loading in user init file
This commit is contained in:
Glenn Morris 2021-01-14 07:50:28 -08:00
commit c83590b121
5 changed files with 21 additions and 15 deletions

View file

@ -284,6 +284,9 @@ sorted. FUNCTION must be a function of one argument."
(cl-defmethod seq-reverse ((sequence sequence)) (cl-defmethod seq-reverse ((sequence sequence))
(reverse sequence)) (reverse sequence))
;; We are autoloading seq-concatenate because cl-concatenate needs
;; that when it's inlined, per the cl-proclaim in cl-macs.el.
;;;###autoload
(cl-defgeneric seq-concatenate (type &rest sequences) (cl-defgeneric seq-concatenate (type &rest sequences)
"Concatenate SEQUENCES into a single sequence of type TYPE. "Concatenate SEQUENCES into a single sequence of type TYPE.
TYPE must be one of following symbols: vector, string or list. TYPE must be one of following symbols: vector, string or list.

View file

@ -838,10 +838,6 @@ This is like `describe-bindings', but displays only Isearch keys."
:image '(isearch-tool-bar-image "left-arrow"))) :image '(isearch-tool-bar-image "left-arrow")))
map)) map))
;; Note: Before adding more key bindings to this map, please keep in
;; mind that any unbound key exits Isearch and runs the command bound
;; to it in the local or global map. So in effect every key unbound
;; in this map is implicitly bound.
(defvar minibuffer-local-isearch-map (defvar minibuffer-local-isearch-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map) (set-keymap-parent map minibuffer-local-map)

View file

@ -132,8 +132,10 @@ This is an alternative of `scroll-up'. Scope moves downward."
(pixel-line-height)))) (pixel-line-height))))
(if (pixel-eob-at-top-p) ; when end-of-the-buffer is close (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
(scroll-up 1) ; relay on robust method (scroll-up 1) ; relay on robust method
(catch 'no-movement
(while (pixel-point-at-top-p amt) ; prevent too late (multi tries) (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
(vertical-motion 1)) ; move point downward (unless (>= (vertical-motion 1) 1) ; move point downward
(throw 'no-movement nil)))) ; exit loop when point did not move
(pixel-scroll-pixel-up amt)))))) ; move scope downward (pixel-scroll-pixel-up amt)))))) ; move scope downward
(defun pixel-scroll-down (&optional arg) (defun pixel-scroll-down (&optional arg)
@ -149,8 +151,10 @@ This is and alternative of `scroll-down'. Scope moves upward."
pixel-resolution-fine-flag pixel-resolution-fine-flag
(frame-char-height)) (frame-char-height))
(pixel-line-height -1)))) (pixel-line-height -1))))
(catch 'no-movement
(while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
(vertical-motion -1)) ; move point upward (unless (<= (vertical-motion -1) -1) ; move point upward
(throw 'no-movement nil)))) ; exit loop when point did not move
(if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
(pixel-eob-at-top-p)) ; for file with a long line (pixel-eob-at-top-p)) ; for file with a long line
(scroll-down 1) ; relay on robust method (scroll-down 1) ; relay on robust method

View file

@ -921,7 +921,8 @@ the name of the init-file to load. If this file cannot be
loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is
called with no arguments and should return the name of an called with no arguments and should return the name of an
alternate init-file to load. If LOAD-DEFAULTS is non-nil, then alternate init-file to load. If LOAD-DEFAULTS is non-nil, then
load default.el after the init-file. load default.el after the init-file, unless `inhibit-default-init'
is non-nil.
This function sets `user-init-file' to the name of the loaded This function sets `user-init-file' to the name of the loaded
init-file, or to a default value if loading is not possible." init-file, or to a default value if loading is not possible."
@ -977,8 +978,8 @@ init-file, or to a default value if loading is not possible."
(sit-for 1)) (sit-for 1))
(setq user-init-file source)))) (setq user-init-file source))))
(when load-defaults (when (and load-defaults
(not inhibit-default-init))
;; Prevent default.el from changing the value of ;; Prevent default.el from changing the value of
;; `inhibit-startup-screen'. ;; `inhibit-startup-screen'.
(let ((inhibit-startup-screen nil)) (let ((inhibit-startup-screen nil))
@ -1374,7 +1375,7 @@ please check its value")
(expand-file-name (expand-file-name
"init.el" "init.el"
startup-init-directory)) startup-init-directory))
(not inhibit-default-init)) t)
(when (and deactivate-mark transient-mark-mode) (when (and deactivate-mark transient-mark-mode)
(with-current-buffer (window-buffer) (with-current-buffer (window-buffer)

View file

@ -1736,9 +1736,11 @@ interpret DELTA as pixels."
(setq window (window-normalize-window window)) (setq window (window-normalize-window window))
(cond (cond
((< delta 0) ((< delta 0)
(max (- (window-min-size window horizontal ignore pixelwise) (let ((min-size (window-min-size window horizontal ignore pixelwise))
(window-size window horizontal pixelwise)) (size (window-size window horizontal pixelwise)))
delta)) (if (<= size min-size)
0
(max (- min-size size) delta))))
((> delta 0) ((> delta 0)
(if (window-size-fixed-p window horizontal ignore) (if (window-size-fixed-p window horizontal ignore)
0 0