aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>1999-11-17 13:59:15 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>1999-11-17 13:59:15 +0000
commitdbc91730ae55b4e118c093b00f2ba1863360ad1e (patch)
treeffabefc0f0de62435cafea861bf7e0971cc6145e
parentf52654af35eba5c3a1a8a6e43cc49b0507d2e1b1 (diff)
Fix for FSF compatibility
-rw-r--r--generic/texi-docstring-magic.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/texi-docstring-magic.el b/generic/texi-docstring-magic.el
index b9de67f7..7c381f66 100644
--- a/generic/texi-docstring-magic.el
+++ b/generic/texi-docstring-magic.el
@@ -76,6 +76,11 @@
;;
;; ------
+(defun texi-docstring-magic-find-face (face)
+ ;; Compatibility between FSF Emacs and XEmacs
+ (or (facep face)
+ (and (fboundp 'find-face) (find-face face))))
+
(defun texi-docstring-magic-splice-sep (strings sep)
"Return concatenation of STRINGS spliced together with separator SEP."
(let (str)
@@ -240,7 +245,7 @@ Markup as @code{stuff} or @lisp stuff @end lisp."
(defun texi-docstring-magic-texi-for (symbol)
(cond
;; Faces
- ((find-face symbol)
+ ((texi-docstring-magic-find-face symbol)
(let*
((face symbol)
(name (symbol-name face))
@@ -327,7 +332,7 @@ Markup as @code{stuff} or @lisp stuff @end lisp."
(forward-sexp -1))
(skip-chars-forward "'")
(let ((obj (read (current-buffer))))
- (and (symbolp obj) (find-face obj) obj)))
+ (and (symbolp obj) (texi-docstring-magic-find-face obj) obj)))
(set-syntax-table stab)))))
(defun texi-docstring-magic-insert-magic (symbol)
@@ -343,7 +348,7 @@ Markup as @code{stuff} or @lisp stuff @end lisp."
obarray '(lambda (sym)
(or (boundp sym)
(fboundp sym)
- (find-face sym)))
+ (texi-docstring-magic-find-face sym)))
t nil 'variable-history))))
(list (if (equal val "") v (intern val)))))
(insert "\n" texi-docstring-magic-comment " " (symbol-name symbol)))