branch: externals/corfu commit c8d19813cba67218222aa149eca2c0c265222eb7 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@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 <fisht...@gmail.com> ;; Maintainer: Daniel Mendler <m...@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.