Update FSF's address.
[bpt/emacs.git] / lisp / url / url-privacy.el
CommitLineData
8c8b8430 1;;; url-privacy.el --- Global history tracking for URL package
00eef4de
LH
2
3;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
4
8c8b8430
SM
5;; Keywords: comm, data, processes, hypermedia
6
00eef4de
LH
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation; either version 2, or (at your option)
12;; any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs; see the file COPYING. If not, write to the
4fc5845f
LK
21;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22;; Boston, MA 02110-1301, USA.
00eef4de
LH
23
24;;; Code:
8c8b8430
SM
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
00eef4de 83;;; url-privacy.el ends here