diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-11 13:10:13 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-11 13:10:13 -0500 |
commit | 5926f0c02402acb9de6c44f0b4155456aebdc981 (patch) | |
tree | 510525343fa7d39534c6b6cd9c28bf45d2c681c1 /lisp/obsolete | |
parent | 7d0dc31833d471a6f86e947d3165d3fd1452a184 (diff) | |
download | emacs-5926f0c02402acb9de6c44f0b4155456aebdc981.tar.gz |
* 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.
Diffstat (limited to 'lisp/obsolete')
-rw-r--r-- | lisp/obsolete/iswitchb.el | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index a7fd6ccb5f5..a9bc6ef0711 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 () |