aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 531a0e26eaf..4a2deb6b3bf 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -698,7 +698,15 @@ scroll the window of possible completions."
698 (when last 698 (when last
699 (setcdr last nil) 699 (setcdr last nil)
700 ;; Prefer shorter completions. 700 ;; Prefer shorter completions.
701 (setq all (sort all (lambda (c1 c2) (< (length c1) (length c2))))) 701 (setq all (sort all (lambda (c1 c2)
702 (let ((s1 (get-text-property
703 0 :completion-cycle-penalty c1))
704 (s2 (get-text-property
705 0 :completion-cycle-penalty c2)))
706 (if (eq s1 s2)
707 (< (length c1) (length c2))
708 (< (or s1 (length c1))
709 (or s2 (length c2))))))))
702 ;; Prefer recently used completions. 710 ;; Prefer recently used completions.
703 (let ((hist (symbol-value minibuffer-history-variable))) 711 (let ((hist (symbol-value minibuffer-history-variable)))
704 (setq all (sort all (lambda (c1 c2) 712 (setq all (sort all (lambda (c1 c2)