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) 1996 - 1999 Free Software Foundation, Inc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 ;;; This file is part of GNU Emacs.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 ;;; GNU Emacs is free software; you can redistribute it and/or modify
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 ;;; it under the terms of the GNU General Public License as published by
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 ;;; the Free Software Foundation; either version 2, or (at your option)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 ;;; any later version.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
14 ;;; GNU Emacs is distributed in the hope that it will be useful,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 ;;; GNU General Public License for more details.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 ;;; You should have received a copy of the GNU General Public License
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 ;;; Boston, MA 02111-1307, USA.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25 (eval-when-compile (require 'cl))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 (require 'url-vars)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
27
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
28 (if (fboundp 'device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
29 (defalias 'url-device-type 'device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
30 (defun url-device-type (&optional device) (or window-system 'tty)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
31
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
32 ;;;###autoload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33 (defun url-setup-privacy-info ()
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 (interactive)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35 (setq url-system-type
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 (cond
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37 ((or (eq url-privacy-level 'paranoid)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 (memq 'os url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40 nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 ;; First, we handle the inseparable OS/Windowing system
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 ;; combinations
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43 ((eq system-type 'Apple-Macintosh) "Macintosh")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 ((eq system-type 'next-mach) "NeXT")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 ((eq system-type 'windows-nt) "Windows-NT; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46 ((eq system-type 'ms-windows) "Windows; 16bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
47 ((eq system-type 'ms-dos) "MS-DOS; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 ((memq (url-device-type) '(win32 w32)) "Windows; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 ((eq (url-device-type) 'pm) "OS/2; 32bit")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 (t
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51 (case (url-device-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52 (x "X11")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 (ns "OpenStep")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
54 (tty "TTY")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
55 (otherwise nil)))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
56
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
57 (setq url-personal-mail-address (or url-personal-mail-address
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
58 user-mail-address
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
59 (format "%s@%s" (user-real-login-name)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
60 (system-name))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
61
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
62 (if (or (memq url-privacy-level '(paranoid high))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
63 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
64 (memq 'email url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
65 (setq url-personal-mail-address nil))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
66
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
67 (setq url-os-type
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
68 (cond
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
69 ((or (eq url-privacy-level 'paranoid)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
70 (and (listp url-privacy-level)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
71 (memq 'os url-privacy-level)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
72 nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
73 ((boundp 'system-configuration)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
74 system-configuration)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
75 ((boundp 'system-type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
76 (symbol-name system-type))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
77 (t nil))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
78
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
79 (provide 'url-privacy)
|
54699
|
80
|
|
81 ;;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d
|