emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/corfu c8d19813cb 5/5: Minor cleanup


From: ELPA Syncer
Subject: [elpa] externals/corfu c8d19813cb 5/5: Minor cleanup
Date: Thu, 17 Nov 2022 15:57:28 -0500 (EST)

branch: externals/corfu
commit c8d19813cba67218222aa149eca2c0c265222eb7
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Minor cleanup
---
 corfu.el                      | 12 +++++-------
 extensions/corfu-doc-popup.el |  6 +++---
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/corfu.el b/corfu.el
index 214239a62f..2913f360a5 100644
--- a/corfu.el
+++ b/corfu.el
@@ -411,8 +411,7 @@ PARAMS are frame parameters and FRAME is the existing 
frame."
              'resize-mode)))
          (after-make-frame-functions)
          (parent (window-frame)))
-    (unless (and (frame-live-p frame)
-                 (eq (frame-parent frame) parent))
+    (unless (and (frame-live-p frame) (eq (frame-parent frame) parent))
       (when frame (delete-frame frame))
       (setq frame (make-frame
                    `((parent-frame . ,parent)
@@ -421,10 +420,9 @@ PARAMS are frame parameters and FRAME is the existing 
frame."
                      (internal-border-width . ,(alist-get 
'child-frame-border-width params))
                      ,@params))))
     ;; XXX HACK Setting the same frame-parameter/face-background is not a nop.
-    ;; Check explicitly before applying the setting. Without the check, the
-    ;; frame flickers on Mac.
-    ;; XXX HACK We have to apply the face background before adjusting the frame
-    ;; parameter, otherwise the border is not updated (BUG!).
+    ;; Check before applying the setting. Without the check, the frame flickers
+    ;; on Mac. We have to apply the face background before adjusting the frame
+    ;; parameter, otherwise the border is not updated (BUG?).
     (let* ((face (if (facep 'child-frame-border) 'child-frame-border 
'internal-border))
            (new (face-attribute 'corfu-border :background nil 'default)))
       (unless (equal (face-attribute face :background frame 'default) new)
@@ -499,7 +497,7 @@ A scroll bar is displayed from LO to LO+BAR."
                            (when (eq row curr)
                              (add-face-text-property
                               0 (length str) 'corfu-current 'append str))
-                           (setq row (1+ row))
+                           (cl-incf row)
                            str))
                        lines "\n"))))))
 
diff --git a/extensions/corfu-doc-popup.el b/extensions/corfu-doc-popup.el
index 7d9278de7b..700afc3c99 100644
--- a/extensions/corfu-doc-popup.el
+++ b/extensions/corfu-doc-popup.el
@@ -4,8 +4,8 @@
 
 ;; Author: Yuwei Tian <fishtai0@gmail.com>
 ;; Maintainer: Daniel Mendler <mail@daniel-mendler.de>
-;; Created: 2021
-;; Version: 0.9
+;; Created: 2022
+;; Version: 0.1
 ;; Keywords: corfu popup documentation convenience
 ;; Package-Requires: ((emacs "27.1") (corfu "0.28"))
 ;; Homepage: https://github.com/minad/corfu
@@ -408,7 +408,7 @@ See `scroll-up' for details."
                               (get-buffer " *corfu-doc-popup*"))))
     (with-selected-frame corfu-doc-popup--frame
       (with-current-buffer cf-doc-buf
-        (funcall #'scroll-up n)))))
+        (scroll-up n)))))
 
 (defun corfu-doc-popup-scroll-down (&optional n)
   "Scroll text of doc popup window down N lines.



reply via email to

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