Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lyskom-elisp-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
b9584630
Commit
b9584630
authored
Dec 17, 2000
by
Ulrik Haugen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
applied patch from Per Starbäck regarding definition of device-class
parent
56356464
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
25 deletions
+27
-25
src/ChangeLog
src/ChangeLog
+6
-0
src/utilities.el
src/utilities.el
+21
-25
No files found.
src/ChangeLog
View file @
b9584630
2000-12-17 Ulrik Haugen <qha@lysator.liu.se>
* utilities.el: applied patch from Per Starbck, device-class
isn't defined if it doesn't exist, lyskom-device-class is. Caller
changed. (Se text 5867166 in LysLysKOM.)
2000-12-12 David Byers <davby@sen5.ida.liu.se>
2000-12-12 David Byers <davby@sen5.ida.liu.se>
* Release av 0.46.1-BETA-4
* Release av 0.46.1-BETA-4
...
...
src/utilities.el
View file @
b9584630
...
@@ -677,30 +677,26 @@ The order of the list a is kept."
...
@@ -677,30 +677,26 @@ The order of the list a is kept."
(
lyskom-external-function
display-grayscale-p
)
(
lyskom-external-function
display-grayscale-p
)
(
eval-and-compile
(
eval-and-compile
(
if
(
fboundp
'device-class
)
(
cond
((
fboundp
'device-class
)
; XEmacsism
nil
(
defalias
'lyskom-device-class
'device-class
))
(
setq
lyskom-compatibility-definitions
((
and
(
fboundp
'display-color-p
)
(
fboundp
'display-grayscale-p
))
(
cons
'device-class
lyskom-compatibility-definitions
))
;; Emacs 21 can use color even when not running under
(
if
(
and
(
fboundp
'display-color-p
)
(
fboundp
'display-grayscale-p
))
;; X-windows. Note that display-grayscale-p can be false when
;; Emacs 21 can use color even when not running under
;; using a color display! This happens when running on a
;; X-windows. Note that display-grayscale-p can be false when
;; classic Linux tty console.
;; using a color display! This happens when running on a
(
defun
lyskom-device-class
(
&optional
device
)
;; classic Linux tty console.
(
cond
((
display-color-p
device
)
'color
)
((
display-grayscale-p
device
)
'grayscale
)
(
defun
device-class
(
&optional
device
)
(
t
'mono
))))
(
cond
((
display-color-p
device
)
'color
)
(
t
;; This works in Emacs 20 and earlier.
((
display-grayscale-p
device
)
'grayscale
)
(
defun
lyskom-device-class
(
&optional
device
)
(
t
'mono
)))
(
condition-case
nil
;; This works in Emacs 20 and earlier.
(
if
(
x-display-grayscale-p
device
)
(
defun
device-class
(
&optional
device
)
(
if
(
x-display-color-p
device
)
(
condition-case
nil
'color
(
if
(
x-display-grayscale-p
device
)
'grayscale
)
(
if
(
x-display-color-p
device
)
'mono
)
'color
(
error
'mono
))))))
'grayscale
)
'mono
)
(
error
'mono
))))))
(
lyskom-provide-function
frame-property
(
frame
property
&optional
default
)
(
lyskom-provide-function
frame-property
(
frame
property
&optional
default
)
(
or
(
cdr
(
assq
property
(
frame-parameters
frame
)))
(
or
(
cdr
(
assq
property
(
frame-parameters
frame
)))
...
@@ -909,7 +905,7 @@ also reads the proper X resources."
...
@@ -909,7 +905,7 @@ also reads the proper X resources."
(
unless
kom-default-face-scheme
(
unless
kom-default-face-scheme
(
setq
kom-default-face-scheme
(
setq
kom-default-face-scheme
(
condition-case
nil
(
condition-case
nil
(
cond
((
eq
(
device-class
)
'mono
)
'monochrome
)
(
cond
((
eq
(
lyskom-
device-class
)
'mono
)
'monochrome
)
((
eq
(
lyskom-background-mode
)
'dark
)
((
eq
(
lyskom-background-mode
)
'dark
)
'inverse
)
'inverse
)
(
t
'default
))
(
t
'default
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment