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
Open sidebar
emacs
emacs
Commits
efcc2791
Commit
efcc2791
authored
Apr 12, 2002
by
Stefan Monnier
Browse files
(device-class, buffer-syntactic-context)
(buffer-syntactic-context-depth): New funs.
parent
0c4a4faa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
lisp/emacs-lisp/lucid.el
lisp/emacs-lisp/lucid.el
+31
-0
No files found.
lisp/emacs-lisp/lucid.el
View file @
efcc2791
...
...
@@ -107,12 +107,43 @@ bottom of the buffer stack."
(
list
buf
)))
(
buffer-list
)))))))
(
defun
device-class
(
&optional
device
)
"Return the class (color behavior) of DEVICE.
This will be one of 'color, 'grayscale, or 'mono.
This function exists for compatibility with XEmacs."
(
cond
((
display-color-p
device
)
'color
)
((
display-grayscale-p
device
)
'grayscale
)
(
t
'mono
)))
(
defalias
'find-face
'internal-find-face
)
(
defalias
'get-face
'internal-get-face
)
(
defalias
'try-face-font
'internal-try-face-font
)
(
defalias
'exec-to-string
'shell-command-to-string
)
;; Buffer context
(
defun
buffer-syntactic-context
(
&optional
buffer
)
"Syntactic context at point in BUFFER.
Either of `string', `comment' or `nil'.
This is an XEmacs compatibility function."
(
with-current-buffer
(
or
buffer
(
current-buffer
))
(
let
((
state
(
syntax-ppss
(
point
))))
(
cond
((
nth
3
state
)
'string
)
((
nth
4
state
)
'comment
)))))
(
defun
buffer-syntactic-context-depth
(
&optional
buffer
)
"Syntactic parenthesis depth at point in BUFFER.
This is an XEmacs compatibility function."
(
with-current-buffer
(
or
buffer
(
current-buffer
))
(
nth
0
(
syntax-ppss
(
point
)))))
;; Extents
(
defun
make-extent
(
beg
end
&optional
buffer
)
(
make-overlay
beg
end
buffer
))
...
...
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