Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-menu.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 ;;; $RCSFile: w3-menu.el,v $ --- menu functions for emacs-w3 | 1 ;;; w3-menu.el --- Menu functions for emacs-w3 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1996/06/03 17:35:14 | 3 ;; Created: 1996/07/21 18:29:01 |
4 ;; Version: 1.28 | 4 ;; Version: 1.7 |
5 ;; Keywords: menu, hypermedia | 5 ;; Keywords: menu, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) | 8 ;;; Copyright (c) 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 |
116 | 116 |
117 (defun w3-toggle-menubar () | 117 (defun w3-toggle-menubar () |
118 (interactive) | 118 (interactive) |
119 (cond | 119 (cond |
120 ;; XEmacs style | 120 ;; XEmacs style |
121 ((and w3-running-xemacs (w3-menubar-active)) | |
122 ;; Turn the menubar off | |
123 (setq current-menubar nil)) | |
124 (w3-running-xemacs | 121 (w3-running-xemacs |
125 ;; Turn the menubar on | 122 (set-specifier menubar-visible-p (cons (current-buffer) |
126 (w3-menu-install-menus)) | 123 (not (specifier-instance |
124 menubar-visible-p))))) | |
127 ;; Emacs 19 style | 125 ;; Emacs 19 style |
128 (t | 126 (t |
129 (menu-bar-mode (if (w3-menubar-active) -1 1))))) | 127 (menu-bar-mode (if (w3-menubar-active) -1 1))))) |
130 | 128 |
131 (defun w3-location-active () | 129 (defun w3-location-active () |
133 (specifier-instance has-modeline-p (selected-window)) | 131 (specifier-instance has-modeline-p (selected-window)) |
134 t)) | 132 t)) |
135 | 133 |
136 (defun w3-menubar-active () | 134 (defun w3-menubar-active () |
137 (if w3-running-xemacs | 135 (if w3-running-xemacs |
138 (and (featurep 'menubar) current-menubar) | 136 (and (featurep 'menubar) (specifier-instance menubar-visible-p)) |
139 (and (boundp 'menu-bar-mode) menu-bar-mode))) | 137 (and (boundp 'menu-bar-mode) menu-bar-mode))) |
140 | 138 |
141 (defun w3-menu-global-menubar () | 139 (defun w3-menu-global-menubar () |
142 (if w3-running-xemacs | 140 (if w3-running-xemacs |
143 (default-value 'default-menubar) | 141 (default-value 'default-menubar) |
251 ) | 249 ) |
252 "W3 menu bookmark list.") | 250 "W3 menu bookmark list.") |
253 | 251 |
254 (defconst w3-menu-options-menu | 252 (defconst w3-menu-options-menu |
255 (list "Options" | 253 (list "Options" |
254 ["Edit Preferences" w3-preferences-edit t] | |
255 "---" | |
256 ["Show Menubar" w3-toggle-menubar | 256 ["Show Menubar" w3-toggle-menubar |
257 :style toggle :selected (w3-menubar-active)] | 257 :style toggle :selected (w3-menubar-active)] |
258 (if (and w3-running-xemacs (featurep 'toolbar)) | 258 (if (and w3-running-xemacs (featurep 'toolbar)) |
259 ["Show Toolbar" w3-toggle-toolbar | 259 ["Show Toolbar" w3-toggle-toolbar |
260 :style toggle :selected (w3-toolbar-active)] | 260 :style toggle :selected (w3-toolbar-active)] |
274 ["Auto Load Images" | 274 ["Auto Load Images" |
275 (setq w3-delay-image-loads (not w3-delay-image-loads)) | 275 (setq w3-delay-image-loads (not w3-delay-image-loads)) |
276 :style toggle :selected (not w3-delay-image-loads)] | 276 :style toggle :selected (not w3-delay-image-loads)] |
277 ["Flush Image Cache" (setq w3-graphics-list nil) w3-graphics-list] | 277 ["Flush Image Cache" (setq w3-graphics-list nil) w3-graphics-list] |
278 "----" | 278 "----" |
279 ["Privacy Mode" (progn | |
280 (setq url-privacy-level | |
281 (if (eq 'paranoid url-privacy-level) | |
282 'none | |
283 'paranoid)) | |
284 (url-setup-privacy-info)) | |
285 :style toggle :selected (not (eq url-privacy-level 'none))] | |
286 ["Color Printing" (setq ps-print-color-p (not ps-print-color-p)) | |
287 :style toggle :selected (and (boundp 'ps-print-color-p) | |
288 ps-print-color-p)] | |
289 ["Honor Automatic Refreshes" | |
290 (setq url-honor-refresh-requests (not url-honor-refresh-requests)) | |
291 :style toggle :selected (not (null url-honor-refresh-requests))] | |
292 "----" | |
293 ["Download to disk" (setq w3-dump-to-disk (not w3-dump-to-disk)) | 279 ["Download to disk" (setq w3-dump-to-disk (not w3-dump-to-disk)) |
294 :style toggle :selected w3-dump-to-disk] | 280 :style toggle :selected w3-dump-to-disk] |
295 ["Caching" (setq url-automatic-caching (not url-automatic-caching)) | 281 ["Caching" (setq url-automatic-caching (not url-automatic-caching)) |
296 :style toggle :selected url-automatic-caching] | 282 :style toggle :selected url-automatic-caching] |
297 ["Use Cache Only" | 283 ["Use Cache Only" |
298 (setq url-standalone-mode (not url-standalone-mode)) | 284 (setq url-standalone-mode (not url-standalone-mode)) |
299 :style toggle :selected url-standalone-mode] | 285 :style toggle :selected url-standalone-mode] |
300 "----" | |
301 ["Fancy Gopher" | |
302 (setq url-use-hypertext-gopher (not url-use-hypertext-gopher)) | |
303 :style toggle :selected url-use-hypertext-gopher] | |
304 ["Fancy Directory Listings" | |
305 (setq url-use-hypertext-dired (not url-use-hypertext-dired)) | |
306 :style toggle :selected url-use-hypertext-dired] | |
307 "----" | 286 "----" |
308 ["Save Options" w3-menu-save-options t] | 287 ["Save Options" w3-menu-save-options t] |
309 ) | 288 ) |
310 "W3 menu options list.") | 289 "W3 menu options list.") |
311 | 290 |
320 :style toggle :selected (and w3-honor-stylesheets | 299 :style toggle :selected (and w3-honor-stylesheets |
321 w3-style-ie-compatibility)] | 300 w3-style-ie-compatibility)] |
322 ["Honor Color Requests" (setq w3-user-colors-take-precedence | 301 ["Honor Color Requests" (setq w3-user-colors-take-precedence |
323 (not w3-user-colors-take-precedence)) | 302 (not w3-user-colors-take-precedence)) |
324 :style toggle :selected (not w3-user-colors-take-precedence)] | 303 :style toggle :selected (not w3-user-colors-take-precedence)] |
304 "---" | |
305 ["Reload Stylesheets" w3-refresh-stylesheets t] | |
325 ) | 306 ) |
326 "W3 menu style list.") | 307 "W3 menu style list.") |
327 | 308 |
328 (defconst w3-menu-buffer-menu | 309 (defconst w3-menu-buffer-menu |
329 (if w3-running-xemacs | 310 (if w3-running-xemacs |
491 (w3-menu-initialize-w3-mode-menu-map) | 472 (w3-menu-initialize-w3-mode-menu-map) |
492 (define-key w3-mode-map [menu-bar] | 473 (define-key w3-mode-map [menu-bar] |
493 (lookup-key w3-mode-menu-map [rootmenu]))))) | 474 (lookup-key w3-mode-menu-map [rootmenu]))))) |
494 | 475 |
495 (defun w3-menu-install-menus () | 476 (defun w3-menu-install-menus () |
496 (cond ((consp w3-use-menus) | 477 (cond ((= emacs-minor-version 28) ; Hey, get with the times people!! |
478 nil) | |
479 ((consp w3-use-menus) | |
497 (w3-menu-install-menubar)) | 480 (w3-menu-install-menubar)) |
498 ((eq w3-use-menus 1) | 481 ((eq w3-use-menus 1) |
499 (w3-menu-install-menubar-item)) | 482 (w3-menu-install-menubar-item)) |
500 (t nil))) | 483 (t nil))) |
501 | 484 |
567 (not (listp val)))) | 550 (not (listp val)))) |
568 val | 551 val |
569 (list 'quote val)))))) | 552 (list 'quote val)))))) |
570 (if var (princ "\n")))) | 553 (if var (princ "\n")))) |
571 '( | 554 '( |
555 ps-print-color-p | |
556 url-automatic-caching | |
557 url-be-asynchronous | |
558 url-honor-refresh-requests | |
559 url-privacy-level | |
560 url-proxy-services | |
561 url-standalone-mode | |
562 url-use-hypertext-dired | |
563 url-use-hypertext-gopher | |
564 w3-color-filter | |
565 w3-color-use-reducing | |
566 w3-default-homepage | |
567 w3-default-stylesheet | |
572 w3-delay-image-loads | 568 w3-delay-image-loads |
573 w3-delay-mpeg-loads | 569 w3-do-incremental-display |
574 ps-print-color-p | |
575 w3-color-use-reducing | |
576 w3-color-filter | |
577 w3-dump-to-disk | 570 w3-dump-to-disk |
571 w3-file-done-hook | |
572 w3-file-prepare-hook | |
573 w3-honor-stylesheets | |
574 w3-image-mappings | |
575 w3-load-hook | |
576 w3-mode-hook | |
577 w3-netscape-compatible-comments | |
578 w3-preferences-cancel-hook | |
579 w3-preferences-default-hook | |
580 w3-preferences-ok-hook | |
581 w3-preferences-setup-hook | |
582 w3-source-file-hook | |
583 w3-style-ie-compatibility | |
584 w3-toolbar-orientation | |
585 w3-toolbar-type | |
586 w3-use-menus | |
578 w3-user-colors-take-precedence | 587 w3-user-colors-take-precedence |
579 w3-do-incremental-display | |
580 url-automatic-caching | |
581 url-standalone-mode | |
582 url-use-hypertext-gopher | |
583 url-use-hypertext-dired | |
584 url-proxy-services | |
585 url-be-asynchronous | |
586 w3-default-homepage | |
587 url-privacy-level | |
588 w3-toolbar-orientation | |
589 ) | 588 ) |
590 ) | 589 ) |
591 (princ ";; ==========================\n") | 590 (princ ";; ==========================\n") |
592 (princ ";; End of W3 Options Settings\n"))) | 591 (princ ";; End of W3 Options Settings\n"))) |
593 (set-marker output-marker nil) | 592 (set-marker output-marker nil) |