(latexenc-find-file-coding-system): Don't inherit the EOL part of the
[emacs.git] / lisp / url / url-privacy.el
blob50f46415b807aaa836675247c0eb68bcb83a72e2
1 ;;; url-privacy.el --- Global history tracking for URL package
3 ;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
5 ;; Keywords: comm, data, processes, hypermedia
7 ;; This file is part of GNU Emacs.
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.
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.
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
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
24 ;;; Code:
26 (eval-when-compile (require 'cl))
27 (require 'url-vars)
29 (if (fboundp 'device-type)
30 (defalias 'url-device-type 'device-type)
31 (defun url-device-type (&optional device) (or window-system 'tty)))
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")
52 (case (url-device-type)
53 (x "X11")
54 (ns "OpenStep")
55 (tty "TTY")
56 (otherwise nil)))))
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))))
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))
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))))
80 (provide 'url-privacy)
82 ;;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d
83 ;;; url-privacy.el ends here