From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Need an enabler for a bad habit. Date: Thu, 02 Nov 2006 15:23:16 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1162478553 3274 80.91.229.2 (2 Nov 2006 14:42:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2006 14:42:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 02 15:42:32 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gfdls-0000Oi-No for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Nov 2006 15:42:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gfdls-0004AN-7D for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Nov 2006 09:42:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: individual.net Rhnh/jqeGdPwx3Xb0a2KsQ41wiWcWkW0Apt0EeVBMN8nosE7HO User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:Hxi/afd9333JUEeq7hI/6JsJugE= Original-Xref: shelby.stanford.edu gnu.emacs.help:142880 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38499 Archived-At: martin rudalics writes: >> The only drawback I can see with it >> is that it removes the "pop up the message buffer" function. > > (defun mouse-drag-region (start-event) > "Set the region to the text that the mouse is dragged over. > Highlight the drag area as you move the mouse. > This must be bound to a button-down mouse event. > In Transient Mark mode, the highlighting remains as long as the mark > remains active. Otherwise, it remains until the next input event. > > If the click is in the echo area, pop up the messages buffer and > run a command." > (interactive "e") > (let ((w (posn-window (event-start start-event)))) > (if (and (window-minibuffer-p w) > (not (minibuffer-window-active-p w))) > (save-excursion > ;; Swallow the up-event. > (read-event) > (set-buffer (get-buffer-create "*Messages*")) > (goto-char (point-max)) > (display-buffer (current-buffer)) > (call-interactively 'execute-extended-command)) > ;; Give temporary modes such as isearch a chance to turn off. > (run-hooks 'mouse-leave-buffer-hook) > (mouse-drag-track start-event t)))) Hehe! I don't like that "feature" though... :)