54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
1 ;;; url-privacy.el --- Global history tracking for URL package
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 ;; Keywords: comm, data, processes, hypermedia
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
3
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 ;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6 ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 ;;; This file is part of GNU Emacs.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 ;;; GNU Emacs is free software; you can redistribute it and/or modify
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 ;;; it under the terms of the GNU General Public License as published by
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 ;;; the Free Software Foundation; either version 2, or (at your option)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 ;;; any later version.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
14 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 ;;; GNU Emacs is distributed in the hope that it will be useful,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 ;;; GNU General Public License for more details.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 ;;; You should have received a copy of the GNU General Public License
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23 ;;; Boston, MA 02111-1307, USA.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
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
|