Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-prefs.el @ 44:8d2a9b52c682 r19-15prefinal
Import from CVS: tag r19-15prefinal
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:55:10 +0200 |
parents | c53a95d3c46d |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
43:23cafc5d2038 | 44:8d2a9b52c682 |
---|---|
1 ;;; w3-prefs.el --- Preferences panels for Emacs-W3 | 1 ;;; w3-prefs.el --- Preferences panels for Emacs-W3 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/03/14 23:49:47 | 3 ;; Created: 1997/03/21 15:52:22 |
4 ;; Version: 1.20 | 4 ;; Version: 1.23 |
5 ;; Keywords: hypermedia, preferences | 5 ;; Keywords: hypermedia, preferences |
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. |
302 (setq host (match-string 1 proxy-entry) | 302 (setq host (match-string 1 proxy-entry) |
303 port (match-string 2 proxy-entry)) | 303 port (match-string 2 proxy-entry)) |
304 (setq host proxy-entry | 304 (setq host proxy-entry |
305 port nil)) | 305 port nil)) |
306 (set (make-local-variable host-var) (or host "")) | 306 (set (make-local-variable host-var) (or host "")) |
307 (set (make-local-variable port-var) (or port ""))))) | 307 (set (make-local-variable port-var) (or port "")))) |
308 (set (make-local-variable 'w3-preferences-temp-no-proxy) | |
309 (cdr-safe (assoc "no_proxy" url-proxy-services)))) | |
308 | 310 |
309 (defun w3-preferences-create-proxy-panel () | 311 (defun w3-preferences-create-proxy-panel () |
310 (let ((proxies '("FTP" "Gopher" "HTTP" "Security" "WAIS" "SHTTP" "News")) | 312 (let ((proxies '("FTP" "Gopher" "HTTP" "Security" "WAIS" "SHTTP" "News")) |
311 (proxy nil) | 313 (proxy nil) |
312 (host-var nil) | 314 (host-var nil) |
333 :value-face 'underline | 335 :value-face 'underline |
334 :notify 'w3-preferences-generic-variable-callback | 336 :notify 'w3-preferences-generic-variable-callback |
335 :value (format "%5s" (symbol-value port-var))) | 337 :value (format "%5s" (symbol-value port-var))) |
336 'variable port-var) | 338 'variable port-var) |
337 (widget-insert "\n\n")) | 339 (widget-insert "\n\n")) |
340 (widget-insert " No proxy: ") | |
341 (widget-put | |
342 (widget-create 'editable-field | |
343 :size 40 | |
344 :value-face 'underline | |
345 :notify 'w3-preferences-generic-variable-callback | |
346 :value (or (symbol-value 'w3-preferences-temp-no-proxy) "")) | |
347 'variable 'w3-preferences-temp-no-proxy) | |
338 (widget-setup))) | 348 (widget-setup))) |
339 | 349 |
340 (defun w3-preferences-save-proxy-panel () | 350 (defun w3-preferences-save-proxy-panel () |
341 (let ((proxies '("FTP" "Gopher" "HTTP" "Security" "WAIS" "SHTTP" "News")) | 351 (let ((proxies '("FTP" "Gopher" "HTTP" "Security" "WAIS" "SHTTP" "News")) |
342 (proxy nil) | 352 (proxy nil) |
344 (port-var nil) | 354 (port-var nil) |
345 (urlobj nil) | 355 (urlobj nil) |
346 (host nil) | 356 (host nil) |
347 (port nil) | 357 (port nil) |
348 (new-proxy-services nil)) | 358 (new-proxy-services nil)) |
359 (if (/= 0 (length (symbol-value 'w3-preferences-temp-no-proxy))) | |
360 (setq new-proxy-services (cons | |
361 (cons | |
362 "no_proxy" | |
363 (symbol-value 'w3-preferences-temp-no-proxy)) | |
364 new-proxy-services))) | |
349 (while proxies | 365 (while proxies |
350 (setq proxy (car proxies) | 366 (setq proxy (car proxies) |
351 proxies (cdr proxies) | 367 proxies (cdr proxies) |
352 host-var (intern (format "w3-%s-proxy-host" (downcase proxy))) | 368 host-var (intern (format "w3-%s-proxy-host" (downcase proxy))) |
353 port-var (intern (format "w3-%s-proxy-port" (downcase proxy))) | 369 port-var (intern (format "w3-%s-proxy-port" (downcase proxy))) |