54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
1 ;;; url-privacy.el --- Global history tracking for URL package
|
57612
|
2
|
|
3 ;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
|
|
4
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 ;; Keywords: comm, data, processes, hypermedia
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6
|
57612
|
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
|
|
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
22 ;; Boston, MA 02111-1307, USA.
|
|
23
|
|
24 ;;; Code:
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 (eval-when-compile (require 'cl))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
27 (require 'url-vars)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
28
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
29 (if (fboundp 'device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
30 (defalias 'url-device-type 'device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
31 (defun url-device-type (&optional device) (or window-system 'tty)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
32
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33 ;;;###autoload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 (defun url-setup-privacy-info ()
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35 (interactive)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 (setq url-system-type
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37 (cond
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 ((or (eq url-privacy-level 'paranoid)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40 (memq 'os url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 ;; First, we handle the inseparable OS/Windowing system
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43 ;; combinations
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 ((eq system-type 'Apple-Macintosh) "Macintosh")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 ((eq system-type 'next-mach) "NeXT")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46 ((eq system-type 'windows-nt) "Windows-NT; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
47 ((eq system-type 'ms-windows) "Windows; 16bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 ((eq system-type 'ms-dos) "MS-DOS; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 ((memq (url-device-type) '(win32 w32)) "Windows; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 ((eq (url-device-type) 'pm) "OS/2; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51 (t
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52 (case (url-device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 (x "X11")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
54 (ns "OpenStep")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
55 (tty "TTY")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
56 (otherwise nil)))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
57
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
58 (setq url-personal-mail-address (or url-personal-mail-address
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
59 user-mail-address
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
60 (format "%s@%s" (user-real-login-name)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
61 (system-name))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
62
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
63 (if (or (memq url-privacy-level '(paranoid high))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
64 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
65 (memq 'email url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
66 (setq url-personal-mail-address nil))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
67
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
68 (setq url-os-type
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
69 (cond
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
70 ((or (eq url-privacy-level 'paranoid)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
71 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
72 (memq 'os url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
73 nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
74 ((boundp 'system-configuration)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
75 system-configuration)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
76 ((boundp 'system-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
77 (symbol-name system-type))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
78 (t nil))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
79
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
80 (provide 'url-privacy)
|
54699
|
81
|
|
82 ;;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d
|
57612
|
83 ;;; url-privacy.el ends here
|