[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lucid.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lucid.el |
Date: |
Thu, 11 Apr 2002 23:25:00 -0400 |
Index: emacs/lisp/emacs-lisp/lucid.el
diff -c emacs/lisp/emacs-lisp/lucid.el:1.28 emacs/lisp/emacs-lisp/lucid.el:1.29
*** emacs/lisp/emacs-lisp/lucid.el:1.28 Tue Sep 4 08:49:11 2001
--- emacs/lisp/emacs-lisp/lucid.el Thu Apr 11 23:25:00 2002
***************
*** 107,118 ****
--- 107,149 ----
(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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lucid.el,
Stefan Monnier <=