Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-menu.el @ 98:0d2f883870bc r20-1b1
Import from CVS: tag r20-1b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:13:56 +0200 |
parents | 6a378aca36af |
children | 360340f9fd5f |
comparison
equal
deleted
inserted
replaced
97:498bf5da1c90 | 98:0d2f883870bc |
---|---|
1 ;;; w3-menu.el --- Menu functions for emacs-w3 | 1 ;;; w3-menu.el --- Menu functions for emacs-w3 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/01/21 20:54:49 | 3 ;; Created: 1997/02/13 23:04:55 |
4 ;; Version: 1.25 | 4 ;; Version: 1.29 |
5 ;; Keywords: menu, hypermedia | 5 ;; Keywords: menu, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 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. |
42 (defvar w3-menu-fsfemacs-search-menu nil) | 42 (defvar w3-menu-fsfemacs-search-menu nil) |
43 (defvar w3-menu-w3-menubar nil) | 43 (defvar w3-menu-w3-menubar nil) |
44 (defvar w3-links-menu nil "Menu for w3-mode in XEmacs.") | 44 (defvar w3-links-menu nil "Menu for w3-mode in XEmacs.") |
45 (make-variable-buffer-local 'w3-links-menu) | 45 (make-variable-buffer-local 'w3-links-menu) |
46 | 46 |
47 (defvar w3-use-menus '(file edit view go bookmark options | 47 (defvar w3-use-menus '(file edit view go bookmark options buffers style |
48 buffers style emacs nil help) | 48 emacs nil help) |
49 "*Non-nil value causes W3 to provide a menu interface. | 49 "*Non-nil value causes W3 to provide a menu interface. |
50 A value that is a list causes W3 to install its own menubar. | 50 A value that is a list causes W3 to install its own menubar. |
51 A value of 1 causes W3 to install a \"W3\" item in the Emacs menubar. | 51 A value of 1 causes W3 to install a \"W3\" item in the Emacs menubar. |
52 | 52 |
53 If the value of w3-use-menus is a list, it should be a list of symbols. | 53 If the value of w3-use-menus is a list, it should be a list of symbols. |
68 help -- The help menu | 68 help -- The help menu |
69 nil -- ** special ** | 69 nil -- ** special ** |
70 | 70 |
71 If nil appears in the list, it should appear exactly once. All | 71 If nil appears in the list, it should appear exactly once. All |
72 menus after nil in the list will be displayed flushright in the | 72 menus after nil in the list will be displayed flushright in the |
73 menubar.") | 73 menubar. |
74 | |
75 NOTE! The current port of Emacs to Windows NT/95 does not support | |
76 buttons in the menubar, so the 'emacs' keyword is currently ignored | |
77 on that platform.") | |
74 | 78 |
75 (defun w3-menu-hotlist-constructor (menu-items) | 79 (defun w3-menu-hotlist-constructor (menu-items) |
76 (or (cdr w3-html-bookmarks) | 80 (or (cdr w3-html-bookmarks) |
77 (let ((hot-menu nil) | 81 (let ((hot-menu nil) |
78 (hot w3-hotlist)) | 82 (hot w3-hotlist)) |
224 ["HTML" (w3-mail-current-document nil "HTML Source") t] | 228 ["HTML" (w3-mail-current-document nil "HTML Source") t] |
225 ["Formatted Text" (w3-mail-current-document nil "Formatted Text") t] | 229 ["Formatted Text" (w3-mail-current-document nil "Formatted Text") t] |
226 ["PostScript" (w3-mail-current-document nil "PostScript") t] | 230 ["PostScript" (w3-mail-current-document nil "PostScript") t] |
227 ["LaTeX Source" (w3-mail-current-document nil "LaTeX Source") t] | 231 ["LaTeX Source" (w3-mail-current-document nil "LaTeX Source") t] |
228 ) | 232 ) |
229 ["Add Annotation" w3-annotation-add w3-personal-annotation-directory] | |
230 (if w3-running-xemacs | 233 (if w3-running-xemacs |
231 "---:shadowDoubleEtchedIn" | 234 "---:shadowDoubleEtchedIn" |
232 "---") | 235 "---") |
233 ["Close" delete-frame (not (eq (next-frame) (selected-frame)))] | 236 ["Close" delete-frame (not (eq (next-frame) (selected-frame)))] |
234 ["Exit" save-buffers-kill-emacs t] | 237 ["Exit" save-buffers-kill-emacs t] |
275 "W3 menu debug list.") | 278 "W3 menu debug list.") |
276 | 279 |
277 (defconst w3-menu-go-menu | 280 (defconst w3-menu-go-menu |
278 (list | 281 (list |
279 "Go" | 282 "Go" |
280 ["Forward" w3-forward-in-history t] | 283 ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))] |
281 ["Backward" w3-backward-in-history t] | 284 ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))] |
282 ["Home" w3 w3-default-homepage] | 285 ["Home" w3 w3-default-homepage] |
283 ["View History..." w3-show-history-list url-keep-history] | 286 ["View History..." w3-show-history-list url-keep-history] |
284 "----" | 287 "----" |
285 (if w3-running-xemacs | 288 (if w3-running-xemacs |
286 '("Links" :filter w3-menu-links-constructor) | 289 '("Links" :filter w3-menu-links-constructor) |
464 (style | 467 (style |
465 (cons "Style" w3-menu-fsfemacs-style-menu)) | 468 (cons "Style" w3-menu-fsfemacs-style-menu)) |
466 (search | 469 (search |
467 (cons "Search" w3-menu-fsfemacs-search-menu)) | 470 (cons "Search" w3-menu-fsfemacs-search-menu)) |
468 (emacs | 471 (emacs |
469 (cons "[Emacs]" 'w3-menu-toggle-menubar)))) | 472 ;; FIXME!!! Currently, win32 doesn't support buttons |
473 ;; in menubars, so we hack around it and ignore the | |
474 ;; 'emacs keyword on that platform. REMOVE THIS CODE | |
475 ;; as soon as that is fixed. 19.35 timeframe? | |
476 (if (eq (device-type) 'win32) | |
477 nil | |
478 (cons "[Emacs]" 'w3-menu-toggle-menubar))))) | |
470 cons | 479 cons |
471 (vec (vector 'rootmenu 'w3 nil)) | 480 (vec (vector 'rootmenu 'w3 nil)) |
472 ;; menus appear in the opposite order that we | 481 ;; menus appear in the opposite order that we |
473 ;; define-key them. | 482 ;; define-key them. |
474 (menu-list | 483 (menu-list |
625 url-be-asynchronous | 634 url-be-asynchronous |
626 url-honor-refresh-requests | 635 url-honor-refresh-requests |
627 url-privacy-level | 636 url-privacy-level |
628 url-proxy-services | 637 url-proxy-services |
629 url-standalone-mode | 638 url-standalone-mode |
630 url-use-hypertext-dired | |
631 url-use-hypertext-gopher | 639 url-use-hypertext-gopher |
632 w3-color-filter | |
633 w3-color-use-reducing | |
634 w3-default-homepage | 640 w3-default-homepage |
635 w3-default-stylesheet | 641 w3-default-stylesheet |
636 w3-delay-image-loads | 642 w3-delay-image-loads |
637 w3-do-incremental-display | 643 w3-do-incremental-display |
638 w3-dump-to-disk | 644 w3-dump-to-disk |