summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-12-15 21:24:48 +0200
committerJuri Linkov <juri@linkov.net>2022-12-15 21:27:36 +0200
commit99aa00e6e34b65169dd8328cb76cce648ba97e9d (patch)
tree86bd063c8cb51d92815a00c1bed4c672a7b7745e /lisp/simple.el
parent386d6e74d83a2b7cff68bd3e072e640784bb3446 (diff)
downloademacs-99aa00e6e34b65169dd8328cb76cce648ba97e9d.tar.gz
Revert 21b387c39bd with last-minute hasty changes (bug#60048).
* lisp/simple.el (completion-list-mode-map): Unbind [up] and [down]. (previous-line-completion, next-line-completion): Remove.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el72
1 files changed, 1 insertions, 71 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 893a43b03fc..654b56a0886 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9578,8 +9578,6 @@ makes it easier to edit it."
(define-key map "\C-m" 'choose-completion)
(define-key map "\e\e\e" 'delete-completion-window)
(define-key map [remap keyboard-quit] #'delete-completion-window)
- (define-key map [up] 'previous-line-completion)
- (define-key map [down] 'next-line-completion)
(define-key map [left] 'previous-completion)
(define-key map [right] 'next-completion)
(define-key map [?\t] 'next-completion)
@@ -9639,8 +9637,7 @@ Go to the window from which completion was requested."
(defcustom completion-auto-wrap t
"Non-nil means to wrap around when selecting completion options.
-This affects the commands `next-completion', `previous-completion',
-`next-line-completion' and `previous-line-completion'.
+This affects the commands `next-completion' and `previous-completion'.
When `completion-auto-select' is t, it wraps through the minibuffer
for the commands bound to the TAB key."
:type 'boolean
@@ -9746,73 +9743,6 @@ Also see the `completion-auto-wrap' variable."
(when (/= 0 n)
(switch-to-minibuffer))))
-(defun previous-line-completion (&optional n)
- "Move to the item on the previous line in the completion list.
-With prefix argument N, move back N items line-wise (negative N
-means move forward).
-
-Also see the `completion-auto-wrap' variable."
- (interactive "p")
- (next-line-completion (- n)))
-
-(defun next-line-completion (&optional n)
- "Move to the item on the next line in the completion list.
-With prefix argument N, move N items line-wise (negative N
-means move backward).
-
-Also see the `completion-auto-wrap' variable."
- (interactive "p")
- (let ((column (current-column))
- pos)
- (catch 'bound
- (while (> n 0)
- (setq pos nil)
- (save-excursion
- (while (and (not pos) (not (eobp)))
- (forward-line 1)
- (when (and (not (eobp))
- (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))))
- (if pos (goto-char pos)
- (when completion-auto-wrap
- (save-excursion
- (goto-char (point-min))
- (when (and (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))
- (while (and (not pos) (not (eobp)))
- (forward-line 1)
- (when (and (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))))
- (if pos (goto-char pos))))
- (setq n (1- n)))
-
- (while (< n 0)
- (setq pos nil)
- (save-excursion
- (while (and (not pos) (not (bobp)))
- (forward-line -1)
- (when (and (not (bobp))
- (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))))
- (if pos (goto-char pos)
- (when completion-auto-wrap
- (save-excursion
- (goto-char (point-max))
- (when (and (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))
- (while (and (not pos) (not (bobp)))
- (forward-line -1)
- (when (and (eq (move-to-column column) column)
- (get-text-property (point) 'mouse-face))
- (setq pos (point)))))
- (if pos (goto-char pos))))
- (setq n (1+ n))))))
-
(defun choose-completion (&optional event no-exit no-quit)
"Choose the completion at point.
If EVENT, use EVENT's position to determine the starting position.