🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Bertil Askelid Thu, 02 May 1991 13:03
Getting out of I-search with mouse?
#2022
Author: Bertil Askelid
Date: Thu, 02 May 1991 13:03
9 lines
1064 bytes
	When you are in an I-search and hit C-f (or any other control sequence but
	ESC, C-s, C-w, C-y, C-q), the I-search is abandonded. Same thing in non-epoch
	Gnu emacs under X when you hit a mouse button.

	Is there any way to make a mouse button cause I-search to be left in Epoch?
-- 
			Bertil Askelid
			ebubra@erix.ericsson.se
Re: Getting out of I-search with mouse?
#2026
Author: Ken Laprade
Date: Fri, 03 May 1991 15:33
40 lines
2026 bytes
In <1991May2.130332.23508@eua.ericsson.se> ebubra@erix.ericsson.se (Bertil Askelid) writes:

>	When you are in an I-search and hit C-f (or any other control
>	sequence but ESC, C-s, C-w, C-y, C-q), the I-search is abandonded.
>	Same thing in non-epoch Gnu emacs under X when you hit a mouse
>	button.

>	Is there any way to make a mouse button cause I-search to be left
>	in Epoch?

I define this:

(defun abort-isearch () "Abort any isearch in progress."
  (condition-case err
      (throw 'search-done t)
    (no-catch nil)))

Then I add it to all the functions I want to abort isearch, e.g.:

(defun start-mouse-drag (arg)
  (when arg
    (setq mouse::downp 'start)
    (mouse::set-point arg)
    (set-mouse-marker)
    (setq mouse::last-point (point))
    (if drag-button
      (progn (delete-button drag-button) (setq drag-button nil) )
    )
  )
  (abort-isearch)
)

It is the easiest solution I could come up with, but it is certainly not
the best thing.  It works most of the time - you still need to abort the
isearch with a control character if it was started from a mouse hit itself.
---
Ken Laprade			INTERNET: laprade@trantor.harris-atd.com
Harris Corporation 		Usenet:  ...!uunet!x102a!trantor!laprade
PO Box 37, MS 3A/1912		Voice: (407)727-4433
Melbourne, FL 32902		FAX: (407)729-3363
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads