comparison lisp/hyperbole/hversion.el @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents c7528f8e288d
children cf808b4c4290
comparison
equal deleted inserted replaced
99:2d83cbd90d8d 100:4be1180a9e89
1 ;;!emacs 1 ;;!emacs
2 ;; 2 ;;
3 ;; LCD-ENTRY: hyperbole|Bob Weiner|hyperbole@hub.ucsb.edu|Everyday Info Manager|03-Nov-95|4.01|ftp.cs.uiuc.edu:/pub/xemacs/infodock/ 3 ;; LCD-ENTRY: hyperbole|Bob Weiner|hyperbole@infodock.com|Everyday Info Manager|21-Feb-97|4.021|ftp://ftp.xemacs.org/pub/infodock
4 ;; 4 ;;
5 ;; FILE: hversion.el 5 ;; FILE: hversion.el
6 ;; SUMMARY: Hyperbole version, system and load path information. 6 ;; SUMMARY: Hyperbole version, system and load path information.
7 ;; USAGE: GNU Emacs Lisp Library 7 ;; USAGE: GNU Emacs Lisp Library
8 ;; KEYWORDS: hypermedia 8 ;; KEYWORDS: hypermedia
9 ;; 9 ;;
10 ;; AUTHOR: Bob Weiner 10 ;; AUTHOR: Bob Weiner
11 ;; ORG: Brown U. 11 ;; ORG: InfoDock Associates
12 ;; 12 ;;
13 ;; ORIG-DATE: 1-Jan-94 13 ;; ORIG-DATE: 1-Jan-94
14 ;; LAST-MOD: 3-Nov-95 at 23:08:37 by Bob Weiner 14 ;; LAST-MOD: 21-Feb-97 at 18:03:57 by Bob Weiner
15 ;; 15 ;;
16 ;; This file is part of Hyperbole. 16 ;; This file is part of Hyperbole.
17 ;; Available for use and distribution under the same terms as GNU Emacs. 17 ;; Available for use and distribution under the same terms as GNU Emacs.
18 ;; 18 ;;
19 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. 19 ;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
20 ;; Developed with support from Motorola Inc. 20 ;; Developed with support from Motorola Inc.
21 ;; 21 ;;
22 ;; DESCRIPTION: 22 ;; DESCRIPTION:
23 ;; DESCRIP-END. 23 ;; DESCRIP-END.
24 24
25 ;;; ************************************************************************ 25 ;;; ************************************************************************
26 ;;; Public variables 26 ;;; Public variables
27 ;;; ************************************************************************ 27 ;;; ************************************************************************
28 28
29 (defconst hyperb:version "04.01" "Hyperbole revision number.") 29 (defconst hyperb:version "04.021" "Hyperbole revision number.")
30 30
31 ;;; Support button highlighting and flashing under XEmacs. 31 ;;; Support button highlighting and flashing under XEmacs.
32 ;;; 32 ;;;
33 (defvar hyperb:xemacs-p 33 (defvar hyperb:xemacs-p
34 (let ((case-fold-search t)) 34 (let ((case-fold-search t))
58 (if (and (boundp 'epoch::version) 58 (if (and (boundp 'epoch::version)
59 (stringp epoch::version)) 59 (stringp epoch::version))
60 (if (string< epoch::version "Epoch 4") "V3" "V4")) 60 (if (string< epoch::version "Epoch 4") "V3" "V4"))
61 "Simplified version string under Epoch, e.g. \"V4\", or nil") 61 "Simplified version string under Epoch, e.g. \"V4\", or nil")
62 62
63 ;; Koutlines work only with specific versions of Emacs 19 and XEmacs. 63 ;;; Koutlines work only with specific versions of Emacs 19 and XEmacs.
64 (defconst hyperb:kotl-p 64 (defconst hyperb:kotl-p
65 (if hyperb:lemacs-p 65 (if hyperb:lemacs-p
66 ;; Only works for XEmacs 19.9 and above. 66 ;; Only works for XEmacs 19.9 and above.
67 (or (string-match "^19\\.9 \\|^19\\.[1-9][0-9]" emacs-version) 67 (or (string-match "^19\\.9 \\|^19\\.[1-9][0-9]" emacs-version)
68 ;; Version 20 and above. 68 ;; Version 20 and above.
69 (string-lessp "20" emacs-version)) 69 (string-lessp "20" emacs-version))
70 hyperb:emacs19-p) 70 hyperb:emacs19-p)
71 "Non-nil iff this Emacs version supports the Hyperbole outliner.") 71 "Non-nil iff this Emacs version supports the Hyperbole outliner.")
72 72
73 ;;; Account for what rain all year round and working for two ex-Harvard guys
74 ;;; will do to programmers.
75 (defvar hyperb:microcruft-os-p
76 (memq system-type '(ms-windows windows-nt ms-dos))
77 "T iff Hyperbole is running under a Microcruft OS.")
78
73 (defun sm-window-sys-term () 79 (defun sm-window-sys-term ()
74 "Returns the first part of the term-type if running under a window system, else nil. 80 "Returns the first part of the term-type if running under a window system, else nil.
75 Where a part in the term-type is delimited by a '-' or an '_'." 81 Where a part in the term-type is delimited by a '-' or an '_'."
76 (let ((term (cond ((memq window-system '(x ns dps pm)) 82 (let* ((display-type (if (fboundp 'device-type) (device-type) window-system))
77 ;; X11, NEXTSTEP (DPS), or OS/2 Presentation Manager (PM) 83 (term (cond ((memq display-type '(x ns dps pm win32))
78 (cond (hyperb:emacs19-p "emacs19") 84 ;; X11, NEXTSTEP (DPS), or OS/2 Presentation Manager (PM)
79 (hyperb:lemacs-p "lemacs") 85 (cond (hyperb:emacs19-p "emacs19")
80 (hyperb:epoch-p "epoch") 86 (hyperb:lemacs-p "lemacs")
81 (t "xterm"))) 87 (hyperb:epoch-p "epoch")
82 ((or (featurep 'eterm-fns) 88 (t "xterm")))
83 (equal (getenv "TERM") "NeXT") 89 ((or (featurep 'eterm-fns)
84 (equal (getenv "TERM") "eterm")) 90 (equal (getenv "TERM") "NeXT")
85 ;; NEXTSTEP add-on support to Emacs 91 (equal (getenv "TERM") "eterm"))
86 "next") 92 ;; NEXTSTEP add-on support to Emacs
87 ((or window-system 93 "next")
88 (featurep 'sun-mouse) (featurep 'apollo)) 94 ((or display-type
89 (getenv "TERM"))))) 95 (featurep 'sun-mouse) (featurep 'apollo))
96 (getenv "TERM")))))
90 (and term 97 (and term
91 (substring term 0 (string-match "[-_]" term))))) 98 (substring term 0 (string-match "[-_]" term)))))
92 99
93 (defconst hyperb:window-system (sm-window-sys-term) 100 (defconst hyperb:window-system (sm-window-sys-term)
94 "String name for window system or term type under which Emacs was run. 101 "String name for window system or term type under which Emacs was run.