emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c83590b 3/3: Merge from origin/emacs-27


From: Glenn Morris
Subject: master c83590b 3/3: Merge from origin/emacs-27
Date: Thu, 14 Jan 2021 10:55:27 -0500 (EST)

branch: master
commit c83590b12114a0958c8e26846c87c84f492405bc
Merge: 4ad332d 488204c
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    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
---
 lisp/emacs-lisp/seq.el |  3 +++
 lisp/isearch.el        |  4 ----
 lisp/pixel-scroll.el   | 12 ++++++++----
 lisp/startup.el        |  9 +++++----
 lisp/window.el         |  8 +++++---
 5 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 31c15fe..64d7e53 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -284,6 +284,9 @@ sorted.  FUNCTION must be a function of one argument."
 (cl-defmethod seq-reverse ((sequence 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)
   "Concatenate SEQUENCES into a single sequence of type TYPE.
 TYPE must be one of following symbols: vector, string or list.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 602643f..d8d3a73 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -838,10 +838,6 @@ This is like `describe-bindings', but displays only 
Isearch keys."
             :image '(isearch-tool-bar-image "left-arrow")))
     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
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index cc0e159..68dc0fb 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -132,8 +132,10 @@ This is an alternative of `scroll-up'.  Scope moves 
downward."
                    (pixel-line-height))))
         (if (pixel-eob-at-top-p)      ; when end-of-the-buffer is close
             (scroll-up 1)             ; relay on robust method
-          (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
-            (vertical-motion 1))            ; move point downward
+          (catch 'no-movement
+            (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
+              (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
 
 (defun pixel-scroll-down (&optional arg)
@@ -149,8 +151,10 @@ This is and alternative of `scroll-down'.  Scope moves 
upward."
                          pixel-resolution-fine-flag
                        (frame-char-height))
                    (pixel-line-height -1))))
-        (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
-          (vertical-motion -1))              ; move point upward
+        (catch 'no-movement
+          (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
+            (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
                 (pixel-eob-at-top-p))    ; for file with a long line
             (scroll-down 1)              ; relay on robust method
diff --git a/lisp/startup.el b/lisp/startup.el
index 57fd87f..cc14fb2 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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
 called with no arguments and should return the name of an
 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
 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))
                   (setq user-init-file source))))
 
-            (when load-defaults
-
+            (when (and load-defaults
+                       (not inhibit-default-init))
               ;; Prevent default.el from changing the value of
               ;; `inhibit-startup-screen'.
               (let ((inhibit-startup-screen nil))
@@ -1374,7 +1375,7 @@ please check its value")
        (expand-file-name
         "init.el"
         startup-init-directory))
-     (not inhibit-default-init))
+     t)
 
     (when (and deactivate-mark transient-mark-mode)
       (with-current-buffer (window-buffer)
diff --git a/lisp/window.el b/lisp/window.el
index 5bb7d57..719bafc 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1736,9 +1736,11 @@ interpret DELTA as pixels."
   (setq window (window-normalize-window window))
   (cond
    ((< delta 0)
-    (max (- (window-min-size window horizontal ignore pixelwise)
-           (window-size window horizontal pixelwise))
-        delta))
+    (let ((min-size (window-min-size window horizontal ignore pixelwise))
+          (size (window-size window horizontal pixelwise)))
+      (if (<= size min-size)
+          0
+        (max (- min-size size) delta))))
    ((> delta 0)
     (if (window-size-fixed-p window horizontal ignore)
        0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]