;;; tooltip.el --- show tooltip windows
;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@acm.org>
;; Keywords: help c mouse tools
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
\f
;;; Switching tooltips on/off
-;; We don't set track-mouse globally because this is a big redisplay
-;; problem in buffers having a pre-command-hook or such installed,
-;; which does a set-buffer, like the summary buffer of Gnus. Calling
-;; set-buffer prevents redisplay optimizations, so every mouse motion
-;; would be accompanied by a full redisplay.
-
(define-minor-mode tooltip-mode
- "Toggle Tooltip display.
-With ARG, turn tooltip mode on if and only if ARG is positive.
+ "Toggle Tooltip mode.
+With ARG, turn Tooltip mode on if and only if ARG is positive.
When this minor mode is enabled, Emacs displays help text
-in a pop-up window on mouse-over. When it is disabled,
-Emacs displays the help text in the echo area instead."
+in a pop-up window for buttons and menu items that you put the mouse on.
+\(However, if `tooltip-use-echo-area' is non-nil, this and
+all pop-up help appears in the echo area.)
+
+When Tooltip mode is disabled, Emacs displays one line of
+the help text in the echo area, and does not make a pop-up window."
:global t
:init-value (not (or noninteractive
emacs-basic-display
:group 'basic-faces)
(defcustom tooltip-use-echo-area nil
- "Use the echo area instead of tooltip frames for help and GUD tooltips."
+ "Use the echo area instead of tooltip frames for help and GUD tooltips.
+To display multi-line help text in the echo area, set this to t
+and enable `tooltip-mode'."
:type 'boolean
:group 'tooltip)
(defmacro tooltip-region-active-p ()
"Value is non-nil if the region is currently active."
- (if (string-match "^GNU" (emacs-version))
+ (if (not (featurep 'xemacs))
`(and transient-mark-mode mark-active)
`(region-active-p)))