# HG changeset patch # User Richard M. Stallman # Date 1116214271 0 # Node ID 3eeae124dcab789e3dd53a5ee2f4d30f72788353 # Parent 8fcdfd20675f2512b646a1950bc93f277b453054 (describe-face): Output a definition link button. diff -r 8fcdfd20675f -r 3eeae124dcab lisp/faces.el --- a/lisp/faces.el Mon May 16 01:08:01 2005 +0000 +++ b/lisp/faces.el Mon May 16 03:31:11 2005 +0000 @@ -1257,17 +1257,32 @@ (insert "Face: " (symbol-name f)) (if (not (facep f)) (insert " undefined face.\n") - (let ((customize-label "customize this face")) + (let ((customize-label "customize this face") + file-name) (princ (concat " (" customize-label ")\n")) (insert "Documentation: " (or (face-documentation f) "Not documented as a face.") - "\n\n") + "\n") (with-current-buffer standard-output (save-excursion (re-search-backward (concat "\\(" customize-label "\\)") nil t) (help-xref-button 1 'help-customize-face f))) + ;; The next 4 sexps are copied from describe-function-1 + ;; and simplified. + (setq file-name (symbol-file f 'defface)) + (when file-name + (princ "Defined in `") + (princ file-name) + (princ "'") + ;; Make a hyperlink to the library. + (save-excursion + (re-search-backward "`\\([^`']+\\)'" nil t) + (help-xref-button 1 'help-face-def f file-name)) + (princ ".") + (terpri) + (terpri)) (dolist (a attrs) (let ((attr (face-attribute f (car a) frame))) (insert (make-string (- max-width (length (cdr a))) ?\ ) @@ -2047,7 +2062,7 @@ (t :inverse-video t)) "Basic face for highlighting trailing whitespace." :version "21.1" - :group 'font-lock ; like `show-trailing-whitespace' + :group 'whitespace ; like `show-trailing-whitespace' :group 'basic-faces) (defface escape-glyph '((((background dark)) :foreground "cyan")