Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-xemac.el @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | 9ee227acff29 |
children | 8fc7fe29b841 |
comparison
equal
deleted
inserted
replaced
15:ad457d5f7d04 | 16:0293115a14e9 |
---|---|
1 ;;; w3-xemac.el --- XEmacs specific functions for emacs-w3 | 1 ;;; w3-xemac.el --- XEmacs specific functions for emacs-w3 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1996/11/27 15:11:46 | 3 ;; Created: 1997/01/19 20:06:02 |
4 ;; Version: 1.7 | 4 ;; Version: 1.12 |
5 ;; Keywords: faces, help, mouse, hypermedia | 5 ;; Keywords: faces, help, mouse, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
10 ;;; | 10 ;;; |
11 ;;; This file is part of GNU Emacs. | 11 ;;; This file is part of GNU Emacs. |
12 ;;; | 12 ;;; |
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;;; it under the terms of the GNU General Public License as published by | 14 ;;; it under the terms of the GNU General Public License as published by |
28 | 28 |
29 (require 'w3-imap) | 29 (require 'w3-imap) |
30 (require 'images) | 30 (require 'images) |
31 (require 'w3-widget) | 31 (require 'w3-widget) |
32 (require 'w3-menu) | 32 (require 'w3-menu) |
33 (require 'w3-forms) | |
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 34 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
34 ;;; Enhancements For XEmacs | 35 ;;; Enhancements For XEmacs |
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 36 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
36 (defun w3-mouse-handler (e) | 37 (defun w3-mouse-handler (e) |
37 "Function to message the url under the mouse cursor" | 38 "Function to message the url under the mouse cursor" |
39 (let* ((pt (event-point e)) | 40 (let* ((pt (event-point e)) |
40 (good (eq (event-window e) (selected-window))) | 41 (good (eq (event-window e) (selected-window))) |
41 (widget (and good pt (number-or-marker-p pt) (widget-at pt))) | 42 (widget (and good pt (number-or-marker-p pt) (widget-at pt))) |
42 (link (and widget (or (widget-get widget 'href) | 43 (link (and widget (or (widget-get widget 'href) |
43 (widget-get widget 'name)))) | 44 (widget-get widget 'name)))) |
44 (form (and widget (widget-get widget 'w3-form-data))) | 45 (form (and widget (widget-get widget :w3-form-data))) |
45 (imag nil) | 46 (imag nil) |
46 ) | 47 ) |
47 (cond | 48 (cond |
48 (link (w3-widget-echo widget)) | 49 (link (message "%s" (w3-widget-echo widget))) |
49 (form | 50 (form |
50 (cond | 51 (cond |
51 ((eq 'submit (w3-form-element-type form)) | 52 ((eq 'submit (w3-form-element-type form)) |
52 (message "Submit form to %s" | 53 (message "Submit form to %s" |
53 (cdr-safe (assq 'action (w3-form-element-action form))))) | 54 (cdr-safe (assq 'action (w3-form-element-action form))))) |
129 nil)) | 130 nil)) |
130 (and echo (message "%s" echo)))) | 131 (and echo (message "%s" echo)))) |
131 | 132 |
132 (defun w3-mode-version-specifics () | 133 (defun w3-mode-version-specifics () |
133 "XEmacs specific stuff for w3-mode" | 134 "XEmacs specific stuff for w3-mode" |
134 (cond | 135 (if (featurep 'mouse) |
135 ((not w3-track-mouse) | 136 (cond |
136 (setq inhibit-help-echo nil)) | 137 ((not w3-track-mouse) |
137 (inhibit-help-echo | 138 (setq inhibit-help-echo nil)) |
138 (setq mode-motion-hook 'w3-mouse-handler)) | 139 (inhibit-help-echo |
139 (t nil)) | 140 (setq mode-motion-hook 'w3-mouse-handler)) |
141 (t nil))) | |
140 (if (eq (device-type) 'tty) | 142 (if (eq (device-type) 'tty) |
141 nil | 143 nil |
142 (w3-add-toolbar-to-buffer)) | 144 (w3-add-toolbar-to-buffer)) |
143 (setq mode-popup-menu w3-popup-menu)) | 145 (setq mode-popup-menu w3-popup-menu)) |
144 | 146 |