;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
-;;; Jeff Peck, Sun Microsystems, Jan 1987.
-;;; Original idea by Stan Jefferson
+;; Jeff Peck, Sun Microsystems, Jan 1987.
+;; Original idea by Stan Jefferson
-;;;
-;;; Modeled after the GNUEMACS keymap interface.
-;;;
-;;; User Functions:
-;;; make-mousemap, copy-mousemap,
-;;; define-mouse, global-set-mouse, local-set-mouse,
-;;; use-global-mousemap, use-local-mousemap,
-;;; mouse-lookup, describe-mouse-bindings
-;;;
-;;; Options:
-;;; extra-click-wait, scrollbar-width
-;;;
+;; Modeled after the GNUEMACS keymap interface.
+;;
+;; User Functions:
+;; make-mousemap, copy-mousemap,
+;; define-mouse, global-set-mouse, local-set-mouse,
+;; use-global-mousemap, use-local-mousemap,
+;; mouse-lookup, describe-mouse-bindings
+;;
+;; Options:
+;; extra-click-wait, scrollbar-width
;;; Code:
;;; All the useful code bits
(defmacro sm::hit-code (hit)
- (` (nth 0 (, hit))))
+ `(nth 0 ,hit))
;;; The button, or buttons if a chord.
(defmacro sm::hit-button (hit)
- (` (logand sm::ButtonBits (nth 0 (, hit)))))
+ `(logand sm::ButtonBits (nth 0 ,hit)))
;;; The shift, control, and meta flags.
(defmacro sm::hit-shiftmask (hit)
- (` (logand sm::ShiftmaskBits (nth 0 (, hit)))))
+ `(logand sm::ShiftmaskBits (nth 0 ,hit)))
;;; Set if a double click (but not a chord).
(defmacro sm::hit-double (hit)
- (` (logand sm::DoubleBits (nth 0 (, hit)))))
+ `(logand sm::DoubleBits (nth 0 ,hit)))
;;; Set on button release (as opposed to button press).
(defmacro sm::hit-up (hit)
- (` (logand sm::UpBits (nth 0 (, hit)))))
+ `(logand sm::UpBits (nth 0 ,hit)))
;;; Screen x position.
(defmacro sm::hit-x (hit) (list 'nth 1 hit))
;;; Screen y position.
;;; Milliseconds since last hit.
(defmacro sm::hit-delta (hit) (list 'nth 3 hit))
-(defmacro sm::hit-up-p (hit) ; A predicate.
- (` (not (zerop (sm::hit-up (, hit))))))
+(defmacro sm::hit-up-p (hit) ; A predicate.
+ `(not (zerop (sm::hit-up ,hit))))
;;;
;;; Loc accessors. for sm::window-xy
(defmacro eval-in-buffer (buffer &rest forms)
"Macro to switches to BUFFER, evaluates FORMS, returns to original buffer."
;; When you don't need the complete window context of eval-in-window
- (` (let ((StartBuffer (current-buffer)))
+ `(let ((StartBuffer (current-buffer)))
(unwind-protect
- (progn
- (set-buffer (, buffer))
- (,@ forms))
- (set-buffer StartBuffer)))))
+ (progn
+ (set-buffer ,buffer)
+ ,@forms)
+ (set-buffer StartBuffer))))
(put 'eval-in-buffer 'lisp-indent-function 1)
;;;
(defmacro eval-in-window (window &rest forms)
"Switch to WINDOW, evaluate FORMS, return to original window."
- (` (let ((OriginallySelectedWindow (selected-window)))
- (unwind-protect
- (progn
- (select-window (, window))
- (,@ forms))
- (select-window OriginallySelectedWindow)))))
+ `(let ((OriginallySelectedWindow (selected-window)))
+ (unwind-protect
+ (progn
+ (select-window ,window)
+ ,@forms)
+ (select-window OriginallySelectedWindow))))
(put 'eval-in-window 'lisp-indent-function 1)
;;;
"Switches to each window and evaluates FORM. Optional argument
YESMINI says to include the minibuffer as a window.
This is a macro, and does not evaluate its arguments."
- (` (let ((OriginallySelectedWindow (selected-window)))
- (unwind-protect
- (while (progn
- (, form)
- (not (eq OriginallySelectedWindow
- (select-window
- (next-window nil (, yesmini)))))))
- (select-window OriginallySelectedWindow)))))
+ `(let ((OriginallySelectedWindow (selected-window)))
+ (unwind-protect
+ (while (progn
+ ,form
+ (not (eq OriginallySelectedWindow
+ (select-window
+ (next-window nil ,yesmini))))))
+ (select-window OriginallySelectedWindow))))
(put 'eval-in-window 'lisp-indent-function 0)
(defun move-to-loc (x y)
evaluated for their side-effects rather than their values.
If the selected form is a menu or a symbol whose value is a menu,
then it is displayed and evaluated as a pullright menu item.
- If the the FORM of the first ITEM is nil, the STRING of the item
+ If the FORM of the first ITEM is nil, the STRING of the item
is used as a label for the menu, i.e. it's inverted and not selectable."
(if (symbolp menu) (setq menu (symbol-value menu)))
Insert contents into the current buffer at point."
(interactive "*")
(set-mark-command nil)
- (insert-string (sun-get-selection)))
+ (insert (sun-get-selection)))
(defun sun-select-region (beg end)
"Set the sunwindows selection to the region in the current buffer."
(defvar current-global-mousemap (make-mousemap))
(provide 'sun-mouse)
+(provide 'term/sun-mouse) ; have to (require 'term/sun-mouse)
;;; sun-mouse.el ends here