Convert consecutive FSF copyright years to ranges.
[bpt/emacs.git] / lisp / url / url-privacy.el
CommitLineData
8c8b8430 1;;; url-privacy.el --- Global history tracking for URL package
00eef4de 2
73b0cd50 3;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc.
00eef4de 4
8c8b8430
SM
5;; Keywords: comm, data, processes, hypermedia
6
00eef4de
LH
7;; This file is part of GNU Emacs.
8
4936186e 9;; GNU Emacs is free software: you can redistribute it and/or modify
00eef4de 10;; it under the terms of the GNU General Public License as published by
4936186e
GM
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
00eef4de
LH
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
4936186e 20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
00eef4de
LH
21
22;;; Code:
8c8b8430
SM
23
24(eval-when-compile (require 'cl))
25(require 'url-vars)
26
153ef845
DN
27(defun url-device-type (&optional device)
28 (if (fboundp 'device-type)
bb78f352 29 (device-type device) ; XEmacs
153ef845 30 (or window-system 'tty)))
8c8b8430
SM
31
32;;;###autoload
33(defun url-setup-privacy-info ()
59425106 34 "Setup variables that expose info about you and your system."
8c8b8430
SM
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
8c8b8430 44 ((eq system-type 'windows-nt) "Windows-NT; 32bit")
8c8b8430
SM
45 ((eq system-type 'ms-dos) "MS-DOS; 32bit")
46 ((memq (url-device-type) '(win32 w32)) "Windows; 32bit")
47 ((eq (url-device-type) 'pm) "OS/2; 32bit")
48 (t
49 (case (url-device-type)
50 (x "X11")
51 (ns "OpenStep")
52 (tty "TTY")
53 (otherwise nil)))))
54
55 (setq url-personal-mail-address (or url-personal-mail-address
56 user-mail-address
57 (format "%s@%s" (user-real-login-name)
58 (system-name))))
59
60 (if (or (memq url-privacy-level '(paranoid high))
61 (and (listp url-privacy-level)
62 (memq 'email url-privacy-level)))
63 (setq url-personal-mail-address nil))
64
65 (setq url-os-type
66 (cond
67 ((or (eq url-privacy-level 'paranoid)
68 (and (listp url-privacy-level)
69 (memq 'os url-privacy-level)))
70 nil)
59425106
SM
71 ((boundp 'system-configuration) system-configuration)
72 ((boundp 'system-type) (symbol-name system-type))
8c8b8430
SM
73 (t nil))))
74
75(provide 'url-privacy)
e5566bd5 76
00eef4de 77;;; url-privacy.el ends here