From dbc91730ae55b4e118c093b00f2ba1863360ad1e Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 17 Nov 1999 13:59:15 +0000 Subject: Fix for FSF compatibility --- generic/texi-docstring-magic.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'generic') 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))) -- cgit v1.2.3