Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-196
[bpt/emacs.git] / lisp / url / url-privacy.el
CommitLineData
8c8b8430 1;;; url-privacy.el --- Global history tracking for URL package
8c8b8430
SM
2;; Keywords: comm, data, processes, hypermedia
3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;;
8;;; This file is part of GNU Emacs.
9;;;
10;;; GNU Emacs is free software; you can redistribute it and/or modify
11;;; it under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 2, or (at your option)
13;;; any later version.
14;;;
15;;; GNU Emacs is distributed in the hope that it will be useful,
16;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Emacs; see the file COPYING. If not, write to the
22;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;;; Boston, MA 02111-1307, USA.
24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25
26(eval-when-compile (require 'cl))
27(require 'url-vars)
28
29(if (fboundp 'device-type)
30 (defalias 'url-device-type 'device-type)
31 (defun url-device-type (&optional device) (or window-system 'tty)))
32
33;;;###autoload
34(defun url-setup-privacy-info ()
35 (interactive)
36 (setq url-system-type
37 (cond
38 ((or (eq url-privacy-level 'paranoid)
39 (and (listp url-privacy-level)
40 (memq 'os url-privacy-level)))
41 nil)
42 ;; First, we handle the inseparable OS/Windowing system
43 ;; combinations
44 ((eq system-type 'Apple-Macintosh) "Macintosh")
45 ((eq system-type 'next-mach) "NeXT")
46 ((eq system-type 'windows-nt) "Windows-NT; 32bit")
47 ((eq system-type 'ms-windows) "Windows; 16bit")
48 ((eq system-type 'ms-dos) "MS-DOS; 32bit")
49 ((memq (url-device-type) '(win32 w32)) "Windows; 32bit")
50 ((eq (url-device-type) 'pm) "OS/2; 32bit")
51 (t
52 (case (url-device-type)
53 (x "X11")
54 (ns "OpenStep")
55 (tty "TTY")
56 (otherwise nil)))))
57
58 (setq url-personal-mail-address (or url-personal-mail-address
59 user-mail-address
60 (format "%s@%s" (user-real-login-name)
61 (system-name))))
62
63 (if (or (memq url-privacy-level '(paranoid high))
64 (and (listp url-privacy-level)
65 (memq 'email url-privacy-level)))
66 (setq url-personal-mail-address nil))
67
68 (setq url-os-type
69 (cond
70 ((or (eq url-privacy-level 'paranoid)
71 (and (listp url-privacy-level)
72 (memq 'os url-privacy-level)))
73 nil)
74 ((boundp 'system-configuration)
75 system-configuration)
76 ((boundp 'system-type)
77 (symbol-name system-type))
78 (t nil))))
79
80(provide 'url-privacy)
e5566bd5
MB
81
82;;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d