branch: externals/mct commit 1fbfc3384e84d02da885ce7b56fcacfa5fb3b62a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Revert "Also consider blank string for completions-header-format" This reverts commit 2eec8aad0596fb85828a919e12445803dcec9210. --- mct.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mct.el b/mct.el index 7505d7241f..02c5f9d667 100644 --- a/mct.el +++ b/mct.el @@ -43,6 +43,7 @@ and the Completions." :link '(info-link "(mct) Top") :link '(url-link :tag "Homepage" "https://protesilaos.com/emacs/mct")) + (make-obsolete 'mct-completion-windows-regexp 'mct--completions-window-name "0.5.0") (defcustom mct-completion-window-size (cons #'mct-frame-height-third 1) @@ -367,8 +368,7 @@ Do it in accordance with the user option `mct-sort-by-command-or-category'." ;; beginning of the line, unless the point was moved forward). (defun mct--setup-clean-completions () "Keep only completion candidates in the Completions." - (when (or (null completions-header-format) - (string-blank-p completions-header-format)) + (unless completions-header-format (with-current-buffer standard-output (unless (mct--first-line-completion-p) (goto-char (point-min)) @@ -627,8 +627,7 @@ by `mct--completions-window-name'." "Return the `point' of the first completion." (save-excursion (goto-char (point-max)) - (when (and completions-header-format - (not (string-blank-p completions-header-format))) + (when completions-header-format (next-completion 1)) (point))) @@ -708,8 +707,7 @@ the minibuffer." "Return non-nil if backward ARG motion exceeds `point-min'." (let ((line (- (line-number-at-pos) arg))) (or (< line 1) - (when (and completions-header-format - (not (string-blank-p completions-header-format))) + (when completions-header-format (= (save-excursion (previous-completion arg) (line-number-at-pos)) @@ -910,8 +908,7 @@ Apply APP while inhibiting modification hooks." "Set up variables for the appearance of the Completions buffer." (when mct-hide-completion-mode-line (setq-local mode-line-format nil)) - (when (and completions-header-format - (not (string-blank-p completions-header-format))) + (when completions-header-format (setq-local display-line-numbers-offset -1))) (defun mct--completion--insert-strings (&rest _)