comparison lisp/w3/w3-vars.el @ 20:859a2309aef8 r19-15b93

Import from CVS: tag r19-15b93
author cvs
date Mon, 13 Aug 2007 08:50:05 +0200
parents 0293115a14e9
children 8fc7fe29b841
comparison
equal deleted inserted replaced
19:ac1f612d5250 20:859a2309aef8
1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3 1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/01/31 04:28:42 3 ;; Created: 1997/02/09 06:46:59
4 ;; Version: 1.76 4 ;; Version: 1.82
5 ;; Keywords: comm, help, hypermedia 5 ;; Keywords: comm, help, 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, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
28 28
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 ;;; Variable definitions for w3 30 ;;; Variable definitions for w3
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 (defconst w3-version-number 32 (defconst w3-version-number
33 (let ((x "p3.0.52")) 33 (let ((x "p3.0.56"))
34 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x) 34 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
35 (setq x (substring x (match-beginning 1) (match-end 1))) 35 (setq x (substring x (match-beginning 1) (match-end 1)))
36 (setq x (substring x 1))) 36 (setq x (substring x 1)))
37 (mapconcat 37 (mapconcat
38 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x "")) 38 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
39 "Version # of w3-mode.") 39 "Version # of w3-mode.")
40 40
41 (defconst w3-version-date (let ((x "1997/01/31 04:28:42")) 41 (defconst w3-version-date (let ((x "1997/02/09 06:46:59"))
42 (if (string-match "Date: \\([^ \t\n]+\\)" x) 42 (if (string-match "Date: \\([^ \t\n]+\\)" x)
43 (substring x (match-beginning 1) (match-end 1)) 43 (substring x (match-beginning 1) (match-end 1))
44 x)) 44 x))
45 "Date this version of w3-mode was released.") 45 "Date this version of w3-mode was released.")
46 46
49 "More descriptive version of w3-version-number.") 49 "More descriptive version of w3-version-number.")
50 50
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52 ;;; General configuration variables 52 ;;; General configuration variables
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54 (defvar w3-annotation-mode 'html-mode
55 "*A symbol specifying the major mode to enter when doing annotations.")
56
57 (defvar w3-annotation-position 'bottom
58 "*A symbol specifying where personal annotations should appear in a buffer.
59 Can be one of the symbols 'top or 'bottom. If the symbol is eq to 'top, then
60 the annotations will appear at the top of the buffer. If 'bottom, will appear
61 at the end of the buffer.")
62
63 (defvar w3-auto-image-alt t 54 (defvar w3-auto-image-alt t
64 "*Whether emacs-w3 should create an alt attribute for an image that 55 "*Whether emacs-w3 should create an alt attribute for an image that
65 is missing it. 56 is missing it.
66 If nil, emacs-w3 will not automatically create an ALT attribute. 57 If nil, emacs-w3 will not automatically create an ALT attribute.
67 If t, the alt attribute will be [IMAGE(nameofimage)] 58 If t, the alt attribute will be [IMAGE(nameofimage)]
241 polite -- don't display w3 page, but prints message when ready (beeps) 232 polite -- don't display w3 page, but prints message when ready (beeps)
242 quiet -- like `polite', but don't beep 233 quiet -- like `polite', but don't beep
243 meek -- make no indication that page is ready 234 meek -- make no indication that page is ready
244 235
245 Any other value of `w3-notify' is equivalent to `meek'.") 236 Any other value of `w3-notify' is equivalent to `meek'.")
246
247 (defvar w3-personal-annotation-directory nil
248 "*Directory where w3 looks for personal annotations.
249 This is a directory that should hold the personal annotations stored in
250 a Mosaic-compatible format.")
251 237
252 (defvar w3-ppmtoxbm-command "ppmtopgm | pgmtopbm | pbmtoxbm" 238 (defvar w3-ppmtoxbm-command "ppmtopgm | pgmtopbm | pbmtoxbm"
253 "*The command used to convert from the portable-pixmap graphics format 239 "*The command used to convert from the portable-pixmap graphics format
254 to an x bitmap. This will only ever be used if XEmacs doesn't have support 240 to an x bitmap. This will only ever be used if XEmacs doesn't have support
255 for XPM.") 241 for XPM.")
700 ;;; Menu definitions 686 ;;; Menu definitions
701 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 687 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
702 (defvar w3-navigate-menu nil) 688 (defvar w3-navigate-menu nil)
703 (defvar w3-popup-menu 689 (defvar w3-popup-menu
704 '("Emacs-W3 Commands" 690 '("Emacs-W3 Commands"
705 ["Back" w3-backward-in-history t] 691 ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))]
706 ["Forward" w3-forward-in-history t] 692 ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))]
707 "---"
708 ["Add annotation" w3-annotation-add t]
709 ) 693 )
710 "The shorter popup menu.") 694 "The shorter popup menu.")
711 695
712 (defvar w3-documentation-root "http://www.cs.indiana.edu/elisp/w3/docs/" 696 (defvar w3-documentation-root "http://www.cs.indiana.edu/elisp/w3/docs/"
713 "*Where the w3 documentation lives. This MUST end in a slash.") 697 "*Where the w3 documentation lives. This MUST end in a slash.")
856 ("File on an http server" . "http") 840 ("File on an http server" . "http")
857 ("Usenet newsgroup/article" . "news") 841 ("Usenet newsgroup/article" . "news")
858 ("Mail session" . "mailto")) 842 ("Mail session" . "mailto"))
859 "An assoc list of descriptive labels and the corresponding URL stub.") 843 "An assoc list of descriptive labels and the corresponding URL stub.")
860 844
861 (defvar w3-annotation-marker "<ncsa-annotation-format-1>")
862 (defvar w3-annotation-minor-mode nil "Whether we are in the minor mode.")
863 (defconst w3-bug-address "wmperry@cs.indiana.edu" 845 (defconst w3-bug-address "wmperry@cs.indiana.edu"
864 "Address of current maintainer, where to send bug reports.") 846 "Address of current maintainer, where to send bug reports.")
865 (defvar w3-continuation '(url-uncompress url-clean-text) 847 (defvar w3-continuation '(url-uncompress url-clean-text)
866 "List of functions to call to process a document completely.") 848 "List of functions to call to process a document completely.")
867 (defvar w3-current-annotation nil "URL of document we are annotating...")
868 (defvar w3-current-isindex nil "Is the current document a searchable index?") 849 (defvar w3-current-isindex nil "Is the current document a searchable index?")
869 (defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.") 850 (defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.")
870 (defvar w3-current-links nil "An assoc list of <link> tags for this doc.") 851 (defvar w3-current-links nil "An assoc list of <link> tags for this doc.")
871 (defvar w3-current-metainfo nil "An assoc list of <meta> tags for this doc.") 852 (defvar w3-current-metainfo nil "An assoc list of <meta> tags for this doc.")
872 (defvar w3-current-source nil "Source of current document.") 853 (defvar w3-current-source nil "Source of current document.")
873 (defvar w3-current-parse nil "Parsed version of current document.") 854 (defvar w3-current-parse nil "Parsed version of current document.")
874 (defconst w3-default-continuation '(url-uncompress url-clean-text) 855 (defconst w3-default-continuation '(url-uncompress url-clean-text)
875 "Default action to start with - cleans text and uncompresses if necessary.") 856 "Default action to start with - cleans text and uncompresses if necessary.")
876 (defvar w3-editing-annotation nil "Are we editing an annotation or not?")
877 (defvar w3-find-this-link nil "Link to go to within a document.") 857 (defvar w3-find-this-link nil "Link to go to within a document.")
878 (defvar w3-hidden-forms nil "List of hidden form areas and their info.") 858 (defvar w3-hidden-forms nil "List of hidden form areas and their info.")
879 (defvar w3-hotlist nil "Default hotlist.") 859 (defvar w3-hotlist nil "Default hotlist.")
880 (defvar w3-icon-path-cache nil "Cache of where we found icons for entities.") 860 (defvar w3-icon-path-cache nil "Cache of where we found icons for entities.")
881 (defvar w3-last-buffer nil "The last W3 buffer visited.") 861 (defvar w3-last-buffer nil "The last W3 buffer visited.")
882 (defvar w3-personal-annotations nil "Assoc list of personal annotations.")
883 (defvar w3-print-next nil "Should we latex & print the next doc?") 862 (defvar w3-print-next nil "Should we latex & print the next doc?")
884 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.") 863 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.")
885 (defvar w3-setup-done nil "Have we been through setup code yet?") 864 (defvar w3-setup-done nil "Have we been through setup code yet?")
886 (defvar w3-source nil "Should we source the next document or not?") 865 (defvar w3-source nil "Should we source the next document or not?")
887 866
919 url-current-referer 898 url-current-referer
920 url-current-server 899 url-current-server
921 url-current-type 900 url-current-type
922 url-current-user 901 url-current-user
923 w3-current-parse 902 w3-current-parse
924 w3-current-annotation
925 w3-current-isindex 903 w3-current-isindex
926 w3-current-last-buffer 904 w3-current-last-buffer
927 w3-current-links 905 w3-current-links
928 w3-current-metainfo 906 w3-current-metainfo
929 w3-current-source 907 w3-current-source
972 (if (boundp var) 950 (if (boundp var)
973 (make-variable-buffer-local var)))) w3-persistent-variables) 951 (make-variable-buffer-local var)))) w3-persistent-variables)
974 (make-variable-buffer-local 'w3-state-vector) 952 (make-variable-buffer-local 'w3-state-vector)
975 (make-variable-buffer-local 'w3-current-stylesheet) 953 (make-variable-buffer-local 'w3-current-stylesheet)
976 (make-variable-buffer-local 'w3-base-alist) 954 (make-variable-buffer-local 'w3-base-alist)
977 (make-variable-buffer-local 'w3-annotation-minor-mode)
978 (make-variable-buffer-local 'w3-last-tag) 955 (make-variable-buffer-local 'w3-last-tag)
979 (make-variable-buffer-local 'w3-last-fill-pos) 956 (make-variable-buffer-local 'w3-last-fill-pos)
980 (make-variable-buffer-local 'w3-table-info) 957 (make-variable-buffer-local 'w3-table-info)
981 (make-variable-buffer-local 'w3-draw-buffer) 958 (make-variable-buffer-local 'w3-draw-buffer)
982 (make-variable-buffer-local 'w3-current-formatter) 959 (make-variable-buffer-local 'w3-current-formatter)
989 966
990 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 967 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
991 ;;; Keymap definitions 968 ;;; Keymap definitions
992 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 969 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
993 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.") 970 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.")
994 (defvar w3-annotation-minor-mode-map (make-keymap) "Keymap for annotation.")
995
996 (suppress-keymap w3-mode-map) 971 (suppress-keymap w3-mode-map)
997 972
998 (define-key w3-mode-map "h" (make-sparse-keymap)) 973 (define-key w3-mode-map "h" (make-sparse-keymap))
999 (define-key w3-mode-map "H" (make-sparse-keymap)) 974 (define-key w3-mode-map "H" (make-sparse-keymap))
1000 (define-key w3-mode-map "a" (make-sparse-keymap)) 975 (define-key w3-mode-map "a" (make-sparse-keymap))
1007 (define-key w3-mode-map "hu" 'w3-use-hotlist) 982 (define-key w3-mode-map "hu" 'w3-use-hotlist)
1008 (define-key w3-mode-map "hA" 'w3-hotlist-append) 983 (define-key w3-mode-map "hA" 'w3-hotlist-append)
1009 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point) 984 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point)
1010 (define-key w3-mode-map "hR" 'w3-hotlist-refresh) 985 (define-key w3-mode-map "hR" 'w3-hotlist-refresh)
1011 986
1012 (define-key w3-mode-map "ai" 'w3-annotation-add) 987 (define-key w3-mode-map "HF" 'w3-history-forward)
1013 (define-key w3-mode-map "ad" 'w3-delete-personal-annotation) 988 (define-key w3-mode-map "HB" 'w3-history-backward)
1014 (define-key w3-mode-map "ae" 'w3-annotation-edit)
1015
1016 (define-key w3-mode-map "HF" 'w3-forward-in-history)
1017 (define-key w3-mode-map "HB" 'w3-backward-in-history)
1018 (define-key w3-mode-map "Hv" 'w3-show-history-list) 989 (define-key w3-mode-map "Hv" 'w3-show-history-list)
1019 990
1020 (define-key w3-mode-map " " 'w3-scroll-up) 991 (define-key w3-mode-map " " 'w3-scroll-up)
1021 (define-key w3-mode-map "<" 'beginning-of-buffer) 992 (define-key w3-mode-map "<" 'beginning-of-buffer)
1022 (define-key w3-mode-map ">" 'end-of-buffer) 993 (define-key w3-mode-map ">" 'end-of-buffer)
1023 (define-key w3-mode-map "?" 'w3-help) 994 (define-key w3-mode-map "?" 'w3-help)
1024 (define-key w3-mode-map "B" 'w3-backward-in-history) 995 (define-key w3-mode-map "B" 'w3-history-backward)
1025 (define-key w3-mode-map "F" 'w3-forward-in-history) 996 (define-key w3-mode-map "F" 'w3-history-forward)
1026 (define-key w3-mode-map "G" 'w3-show-graphics) 997 (define-key w3-mode-map "G" 'w3-show-graphics)
1027 (define-key w3-mode-map "I" 'w3-popup-info) 998 (define-key w3-mode-map "I" 'w3-popup-info)
1028 (define-key w3-mode-map "K" 'w3-save-this-url) 999 (define-key w3-mode-map "K" 'w3-save-this-url)
1029 (define-key w3-mode-map "P" 'w3-print-url-under-point) 1000 (define-key w3-mode-map "P" 'w3-print-url-under-point)
1030 (define-key w3-mode-map "Q" 'w3-leave-buffer) 1001 (define-key w3-mode-map "Q" 'w3-leave-buffer)
1063 ;; Emulate some netscape stuff by default 1034 ;; Emulate some netscape stuff by default
1064 (define-key w3-mode-map [(control alt t)] 'url-list-processes) 1035 (define-key w3-mode-map [(control alt t)] 'url-list-processes)
1065 (define-key w3-mode-map [(control meta t)] 'url-list-processes) 1036 (define-key w3-mode-map [(control meta t)] 'url-list-processes)
1066 1037
1067 ;; Widget navigation 1038 ;; Widget navigation
1068 (define-key w3-mode-map "\t" 'w3-widget-forward) 1039 (define-key w3-mode-map "\t" 'w3-widget-forward)
1040 (define-key w3-mode-map [backtab] 'w3-widget-backward)
1069 (define-key w3-mode-map [(shift tab)] 'w3-widget-backward) 1041 (define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
1042 (define-key w3-mode-map [(meta tab)] 'w3-widget-backward)
1070 1043
1071 (define-key w3-annotation-minor-mode-map "\C-c\C-c"
1072 'w3-personal-annotation-finish)
1073
1074 ;;; This is so we can use a consistent method of checking for mule support 1044 ;;; This is so we can use a consistent method of checking for mule support
1075 ;;; Emacs-based mule uses (boundp 'MULE), but XEmacs-based mule uses 1045 ;;; Emacs-based mule uses (boundp 'MULE), but XEmacs-based mule uses
1076 ;;; (featurep 'mule) - I choose to use the latter. 1046 ;;; (featurep 'mule) - I choose to use the latter.
1077 1047
1078 (if (boundp 'MULE) 1048 (if (boundp 'MULE)