[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5926f0c: * lisp/obsolete/iswitchb.el: Remove dead code
From: |
Stefan Monnier |
Subject: |
master 5926f0c: * lisp/obsolete/iswitchb.el: Remove dead code |
Date: |
Thu, 11 Mar 2021 13:10:18 -0500 (EST) |
branch: master
commit 5926f0c02402acb9de6c44f0b4155456aebdc981
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/obsolete/iswitchb.el: Remove dead code
(most-len, most-is-exact): Delete vars.
(iswitchb-output-completion): Delete function.
(iswitchb-completions): Delete dead code consequence of `most` being nil.
---
lisp/obsolete/iswitchb.el | 33 ++++-----------------------------
1 file changed, 4 insertions(+), 29 deletions(-)
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index a7fd6cc..a9bc6ef 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -1158,18 +1158,6 @@ Copied from `icomplete-exhibit' with two changes:
(insert (iswitchb-completions
contents))))))
-(defvar most-len)
-(defvar most-is-exact)
-
-(defun iswitchb-output-completion (com)
- (if (= (length com) most-len)
- ;; Most is one exact match,
- ;; note that and leave out
- ;; for later indication:
- (ignore
- (setq most-is-exact t))
- (substring com most-len)))
-
(defun iswitchb-completions (name)
"Return the string that is displayed after the user's text.
Modified from `icomplete-completions'."
@@ -1260,16 +1248,11 @@ Modified from `icomplete-completions'."
(nreverse res))
(list "...")
(nthcdr (- (length comps)
- (/ iswitchb-max-to-show 2)) comps))))
+ (/ iswitchb-max-to-show 2))
+ comps))))
(let* (
- ;;(most (try-completion name candidates predicate))
- (most nil)
- (most-len (length most))
- most-is-exact
(alternatives
- (mapconcat (if most #'iswitchb-output-completion
- #'identity)
- comps iswitchb-delim)))
+ (mapconcat #'identity comps iswitchb-delim)))
(concat
@@ -1283,17 +1266,9 @@ Modified from `icomplete-completions'."
close-bracket-determined))
;; end of partial matches...
- ;; think this bit can be ignored.
- (and (> most-len (length name))
- (concat open-bracket-determined
- (substring most (length name))
- close-bracket-determined))
-
;; list all alternatives
open-bracket-prospects
- (if most-is-exact
- (concat iswitchb-delim alternatives)
- alternatives)
+ alternatives
close-bracket-prospects))))))
(defun iswitchb-minibuffer-setup ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5926f0c: * lisp/obsolete/iswitchb.el: Remove dead code,
Stefan Monnier <=