diff options
| author | João Távora | 2025-04-06 14:07:53 +0100 |
|---|---|---|
| committer | João Távora | 2025-04-06 14:08:14 +0100 |
| commit | ba13e7de32d08028ab7bffdd73dab271a95ea453 (patch) | |
| tree | d9705e7f44f99085d67945af71caa489d753296d | |
| parent | 819f92cb12b07938623e18384e86371ee101495a (diff) | |
| download | emacs-ba13e7de32d08028ab7bffdd73dab271a95ea453.tar.gz emacs-ba13e7de32d08028ab7bffdd73dab271a95ea453.zip | |
Icomplete: rename some internal helper functions (bug#77546)
The naming convention for internal functions is
<package-name>--foo
not
<package-name-subfunctionality>--foo
* lisp/icomplete.el (icomplete--adjust-lines-for-column): Rename
from icomplete-vertical--adjust-lines-for-column.
(icomplete--ensure-visible-lines-inside-buffer): Rename from
icomplete-vertical--ensure-visible-lines-inside-buffer.
(icomplete--add-indicator-to-selected): Rename from
icomplete-vertical--add-indicator-to-selected.
(icomplete--render-vertical): Use new internal function names.
| -rw-r--r-- | lisp/icomplete.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index d3b09ebc869..35842b53e6b 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -884,7 +884,7 @@ by `group-function''s second \"transformation\" protocol." | |||
| 884 | else collect (list tr prefix suffix )) | 884 | else collect (list tr prefix suffix )) |
| 885 | annotated))) | 885 | annotated))) |
| 886 | 886 | ||
| 887 | (defun icomplete-vertical--adjust-lines-for-column (lines buffer data) | 887 | (defun icomplete--adjust-lines-for-column (lines buffer data) |
| 888 | "Adjust the LINES to align with the column in BUFFER based on DATA." | 888 | "Adjust the LINES to align with the column in BUFFER based on DATA." |
| 889 | (if icomplete-vertical-in-buffer-adjust-list | 889 | (if icomplete-vertical-in-buffer-adjust-list |
| 890 | (let* ((column (current-column)) | 890 | (let* ((column (current-column)) |
| @@ -914,7 +914,7 @@ by `group-function''s second \"transformation\" protocol." | |||
| 914 | lines)) | 914 | lines)) |
| 915 | lines)) | 915 | lines)) |
| 916 | 916 | ||
| 917 | (defun icomplete-vertical--ensure-visible-lines-inside-buffer () | 917 | (defun icomplete--ensure-visible-lines-inside-buffer () |
| 918 | "Ensure the completion list is visible in regular buffers only. | 918 | "Ensure the completion list is visible in regular buffers only. |
| 919 | Scrolls the screen to be at least `icomplete-prospects-height' real lines | 919 | Scrolls the screen to be at least `icomplete-prospects-height' real lines |
| 920 | away from the bottom. Counts wrapped lines as real lines." | 920 | away from the bottom. Counts wrapped lines as real lines." |
| @@ -925,7 +925,7 @@ away from the bottom. Counts wrapped lines as real lines." | |||
| 925 | (when (< lines-to-bottom icomplete-prospects-height) | 925 | (when (< lines-to-bottom icomplete-prospects-height) |
| 926 | (scroll-up (- icomplete-prospects-height lines-to-bottom)))))) | 926 | (scroll-up (- icomplete-prospects-height lines-to-bottom)))))) |
| 927 | 927 | ||
| 928 | (defun icomplete-vertical--add-indicator-to-selected (comp) | 928 | (defun icomplete--add-indicator-to-selected (comp) |
| 929 | "Add indicator to completion COMP according to its selection state." | 929 | "Add indicator to completion COMP according to its selection state." |
| 930 | (if (get-text-property 0 'icomplete-selected comp) | 930 | (if (get-text-property 0 'icomplete-selected comp) |
| 931 | (concat (propertize icomplete-vertical-selected-prefix-indicator | 931 | (concat (propertize icomplete-vertical-selected-prefix-indicator |
| @@ -956,11 +956,11 @@ away from the bottom. Counts wrapped lines as real lines." | |||
| 956 | (when (and icomplete-scroll | 956 | (when (and icomplete-scroll |
| 957 | (not icomplete--scrolled-completions) | 957 | (not icomplete--scrolled-completions) |
| 958 | (not icomplete--scrolled-past)) | 958 | (not icomplete--scrolled-past)) |
| 959 | (icomplete-vertical--ensure-visible-lines-inside-buffer)) | 959 | (icomplete--ensure-visible-lines-inside-buffer)) |
| 960 | (when (and icomplete-scroll | 960 | (when (and icomplete-scroll |
| 961 | icomplete--scrolled-completions | 961 | icomplete--scrolled-completions |
| 962 | (null icomplete--scrolled-past)) | 962 | (null icomplete--scrolled-past)) |
| 963 | (icomplete-vertical--ensure-visible-lines-inside-buffer) | 963 | (icomplete--ensure-visible-lines-inside-buffer) |
| 964 | (cl-loop with preds | 964 | (cl-loop with preds |
| 965 | for (comp . rest) on comps | 965 | for (comp . rest) on comps |
| 966 | when (equal comp (car icomplete--scrolled-completions)) | 966 | when (equal comp (car icomplete--scrolled-completions)) |
| @@ -1014,7 +1014,7 @@ away from the bottom. Counts wrapped lines as real lines." | |||
| 1014 | for (comp-no-indicator prefix suffix section) in tuples | 1014 | for (comp-no-indicator prefix suffix section) in tuples |
| 1015 | for comp = | 1015 | for comp = |
| 1016 | (if icomplete-vertical-render-prefix-indicator | 1016 | (if icomplete-vertical-render-prefix-indicator |
| 1017 | (icomplete-vertical--add-indicator-to-selected comp-no-indicator) | 1017 | (icomplete--add-indicator-to-selected comp-no-indicator) |
| 1018 | comp-no-indicator) | 1018 | comp-no-indicator) |
| 1019 | when section | 1019 | when section |
| 1020 | collect (propertize section 'face 'icomplete-section) into lines-aux | 1020 | collect (propertize section 'face 'icomplete-section) into lines-aux |
| @@ -1041,7 +1041,7 @@ away from the bottom. Counts wrapped lines as real lines." | |||
| 1041 | (t (min (ceiling nsections 2) (length scroll-above)))) | 1041 | (t (min (ceiling nsections 2) (length scroll-above)))) |
| 1042 | lines)) | 1042 | lines)) |
| 1043 | (when icomplete--in-region-buffer | 1043 | (when icomplete--in-region-buffer |
| 1044 | (setq lines (icomplete-vertical--adjust-lines-for-column | 1044 | (setq lines (icomplete--adjust-lines-for-column |
| 1045 | lines icomplete--in-region-buffer completion-in-region--data))) | 1045 | lines icomplete--in-region-buffer completion-in-region--data))) |
| 1046 | ;; At long last, render final string return value. This may still | 1046 | ;; At long last, render final string return value. This may still |
| 1047 | ;; kick out lines at the end. | 1047 | ;; kick out lines at the end. |