unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36260: 27.0.50; isearchb should be reimplemented without iswitchb
@ 2019-06-17 10:17 Lars Ingebrigtsen
  2019-06-18  2:56 ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-17 10:17 UTC (permalink / raw)
  To: 36260


iswitchb is an obsolete package, but isearchb is implemented on top of
it.  It should be possible to reimplement it on top of any of the
un-obsoleted completion packages (like ido), but it's a complete
reimplementation:

41 matches in 36 lines for "iswitchb" in buffer: isearchb.el
      1:;;; isearchb --- a marriage between iswitchb and isearch
     30:;; iswitchb!  It is not intended to replace it, however, as it works
     37:;; employed by iswitchb).  To use it this way, add to your .emacs:
     59:;; iswitchb, using the prefix you've typed so far.  This is handy when
     75:;;   killing iswitchb.el and then trying to switch back is broken
     80:(require 'iswitchb)                     ;FIXME: Don't rely on iswitchb!
     84:  :group 'iswitchb)
    116:(defun isearchb-iswitchb ()
    117:  "isearchb's custom version of the `iswitchb' command.
    119:`iswitchb-read-buffer'."
    122:	 (iswitchb-method 'samewindow)
    123:	 (buf (iswitchb-read-buffer prompt nil nil nil iswitchb-text t)))
    124:    (if (eq iswitchb-exit 'findfile)
    129:	    (iswitchb-visit-buffer buf)
    131:	  (iswitchb-possible-new-buffer buf))))))
    137:    (setq iswitchb-text nil))
    138:  (unless iswitchb-text
    139:    (setq iswitchb-text "")
    140:    (iswitchb-make-buflist nil))
    142:      (setq iswitchb-rescan t
    143:	    iswitchb-text (concat iswitchb-text
    146:  (iswitchb-set-matches)
    147:  (let* ((match (car iswitchb-matches))
    152:	  (isearchb-iswitchb))
    155:	  (message "isearchb: %s%s" iswitchb-text
    156:		   (iswitchb-completions iswitchb-text))
    157:	(if (= 1 (length iswitchb-matches))
    158:	    (message "isearchb: %s (only match)" iswitchb-text)
    159:	  (message "isearchb: %s" iswitchb-text))))))
    178:	(setq iswitchb-text
    179:	      (substring iswitchb-text 0 (1- (length iswitchb-text))))
    180:	(if (= 0 (length iswitchb-text))
    185:	(setq this-command 'isearchb-iswitchb))
    187:	(iswitchb-next-match)
    191:	(iswitchb-prev-match)
    222:    (setq iswitchb-text nil



In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2019-06-16 built on stories
Repository revision: a1508e8d2db0003fafb53ae51ed1104ba957db6b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9 (stretch)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-03 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 10:17 bug#36260: 27.0.50; isearchb should be reimplemented without iswitchb Lars Ingebrigtsen
2019-06-18  2:56 ` Richard Stallman
2019-06-22 11:52   ` Lars Ingebrigtsen
2019-06-23  2:52     ` Richard Stallman
2021-10-03 19:20       ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).