Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-xemac.el @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 9ee227acff29 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
1 ;;; w3-xemac.el,v --- 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/06/06 14:14:34 | 3 ;; Created: 1996/07/21 06:38:10 |
4 ;; Version: 1.165 | 4 ;; Version: 1.4 |
5 ;; Keywords: faces, help, mouse, hypermedia | 5 ;; Keywords: faces, help, mouse, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) | 8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; | 9 ;;; |
10 ;;; This file is part of GNU Emacs. | 10 ;;; This file is part of GNU Emacs. |
11 ;;; | 11 ;;; |
12 ;;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;;; it under the terms of the GNU General Public License as published by | 13 ;;; it under the terms of the GNU General Public License as published by |
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
32 ;;; Enhancements For XEmacs | 32 ;;; Enhancements For XEmacs |
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
34 (defun w3-mouse-handler (e) | 34 (defun w3-mouse-handler (e) |
35 "Function to message the url under the mouse cursor" | 35 "Function to message the url under the mouse cursor" |
36 (interactive "e") | |
36 (let* ((pt (event-point e)) | 37 (let* ((pt (event-point e)) |
37 (props (and pt (extent-properties-at pt))) | 38 (good (eq (event-window e) (selected-window))) |
38 (link (nth 1 (nth 1 (memq 'w3 props)))) ; The link info if it exists | 39 (widget (and good pt (number-or-marker-p pt) (widget-at pt))) |
39 (form (nth 1 (memq 'w3form props))) ; The form info it it exists | 40 (link (and widget (widget-get widget 'href))) |
40 (dely (nth 0 (nth 1 (memq 'w3delayed props)))) ; The delayed img info | 41 (form (and widget (widget-get widget 'w3-form-data))) |
41 (mpeg (nth 1 (memq 'w3mpeg props))) ; the delayed mpeg info | 42 (imag nil) |
42 (imag (nth 1 (memq 'w3graphic props)))) ; The image info if it exists | 43 ) |
43 (cond | 44 (cond |
44 (link (message "%s" link)) | 45 (link (message "%s" link)) |
45 (form | 46 (form |
46 (let ((args (nth 0 form))) | 47 (cond |
47 (cond | 48 ((eq 'submit (w3-form-element-type form)) |
48 ((string= "SUBMIT" (nth 1 form)) | 49 (message "Submit form to %s" |
49 (message "Submit form to %s" (cdr-safe (assq 'action args)))) | 50 (cdr-safe (assq 'action (w3-form-element-action form))))) |
50 ((string= "RESET" (nth 1 form)) | 51 ((eq 'reset (w3-form-element-type form)) |
51 (message "Reset form contents")) | 52 (message "Reset form contents")) |
52 (t | 53 (t |
53 (message "Form entry (name=%s, type=%s)" (nth 2 form) | 54 (message "Form entry (name=%s, type=%s)" (w3-form-element-name form) |
54 (if (equal "" (nth 1 form)) | 55 (w3-form-element-type form))))) |
55 "text" | |
56 (downcase (nth 1 form)))))))) | |
57 (dely (message "Delayed image (%s)" (car dely))) | |
58 (imag (message "Inlined image (%s)" (car imag))) | 56 (imag (message "Inlined image (%s)" (car imag))) |
59 (mpeg (message "Delayed mpeg (%s)" (car mpeg))) | |
60 (t (message ""))))) | 57 (t (message ""))))) |
61 | 58 |
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
63 ;;; Functions to build menus of urls | 60 ;;; Functions to build menus of urls |
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 61 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
131 | 128 |
132 (defun w3-mode-version-specifics () | 129 (defun w3-mode-version-specifics () |
133 "XEmacs specific stuff for w3-mode" | 130 "XEmacs specific stuff for w3-mode" |
134 (cond | 131 (cond |
135 ((not w3-track-mouse) | 132 ((not w3-track-mouse) |
136 nil) | 133 (setq inhibit-help-echo nil)) |
137 ((or (not (boundp 'inhibit-help-echo)) | 134 (inhibit-help-echo |
138 inhibit-help-echo) | |
139 (setq mode-motion-hook 'w3-mouse-handler)) | 135 (setq mode-motion-hook 'w3-mouse-handler)) |
140 (t nil)) | 136 (t nil)) |
141 (if (eq (device-type) 'tty) | 137 (if (eq (device-type) 'tty) |
142 nil | 138 nil |
143 (w3-add-toolbar-to-buffer)) | 139 (w3-add-toolbar-to-buffer)) |